• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂93b82294f5eb4811053cf7355cf0c83b959e88bb (tree)
時間2023-03-07 21:44:39
作者matsuand <30614168+matsuand@user...>
Commitermatsuand

Log Message

[BLFS] Add

libvirt-glib-4.0.0
libvirt-9.1.0
logrotate-3.21.0

Change Summary

差異

--- /dev/null
+++ b/BLFS/libvirt-glib.sh
@@ -0,0 +1,44 @@
1+#!/bin/sh
2+
3+. ./_blfsset.sh
4+
5+APPNAME=libvirt-glib
6+VER=4.0.0
7+TARGET=$APPNAME-$VER
8+TARGETBALL=$DLD/$TARGET.tar.xz
9+TARGETDIR=$TARGET
10+
11+echo $TARGET
12+
13+. $WRK/_checkRequired.sh ""
14+. $WRK/_checkOptions.sh ""
15+. $WRK/_checkTarball.sh
16+. $WRK/_checkExit.sh "$1" || exit $?
17+
18+cd $SRC
19+RemoveSrcDir
20+Extract
21+
22+TimeStart
23+
24+cd $TARGETDIR
25+
26+Configuring
27+meson build -Dprefix=/usr \
28+ 1> $LOG/$TARGET.1_conf.log 2>&1 || exit 1
29+
30+Making
31+ninja -C build
32+ 1> $LOG/$TARGET.2_make.log 2>&1 || exit 1
33+
34+Installing
35+porg -lp $TARGET -E$PWD "\
36+ninja -C build install" \
37+ 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1
38+
39+TimeEnd
40+
41+cd ..
42+RemoveSrcDir
43+PorgingDone
44+
--- /dev/null
+++ b/BLFS/libvirt.sh
@@ -0,0 +1,44 @@
1+#!/bin/sh
2+
3+. ./_blfsset.sh
4+
5+APPNAME=libvirt
6+VER=9.1.0
7+TARGET=$APPNAME-$VER
8+TARGETBALL=$DLD/$TARGET.tar.xz
9+TARGETDIR=$TARGET
10+
11+echo $TARGET
12+
13+. $WRK/_checkRequired.sh ""
14+. $WRK/_checkOptions.sh ""
15+. $WRK/_checkTarball.sh
16+. $WRK/_checkExit.sh "$1" || exit $?
17+
18+cd $SRC
19+RemoveSrcDir
20+Extract
21+
22+TimeStart
23+
24+cd $TARGETDIR
25+
26+Configuring
27+meson build -Dsystem=true \
28+ 1> $LOG/$TARGET.1_conf.log 2>&1 || exit 1
29+
30+Making
31+ninja -C build
32+ 1> $LOG/$TARGET.2_make.log 2>&1 || exit 1
33+
34+Installing
35+porg -lp $TARGET "\
36+ninja -C build install" \
37+ 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1
38+
39+TimeEnd
40+
41+cd ..
42+RemoveSrcDir
43+PorgingDone
44+
--- /dev/null
+++ b/BLFS/logrotate.sh
@@ -0,0 +1,156 @@
1+#!/bin/sh
2+
3+. ./_blfsset.sh
4+
5+APPNAME=logrotate
6+VER=3.21.0
7+TARGET=$APPNAME-$VER
8+TARGETBALL=$DLD/$TARGET.tar.xz
9+TARGETDIR=$TARGET
10+
11+echo $TARGET
12+
13+. $WRK/_checkRequired.sh \
14+ popt
15+. $WRK/_checkOptions.sh ""
16+. $WRK/_checkTarball.sh
17+. $WRK/_checkExit.sh "$1" || exit $?
18+
19+cd $SRC
20+RemoveSrcDir
21+Extract
22+
23+TimeStart
24+
25+cd $TARGETDIR
26+
27+Configuring
28+./configure --prefix=/usr \
29+ 1> $LOG/$TARGET.1_conf.log 2>&1 || exit 1
30+
31+Making
32+make \
33+ 1> $LOG/$TARGET.2_make.log 2>&1 || exit 1
34+
35+Installing
36+porg -lp $TARGET -E$PWD "make install" \
37+ 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1
38+
39+TimeEnd
40+
41+cat > /etc/logrotate.conf << EOF
42+# Begin /etc/logrotate.conf
43+
44+# Rotate log files weekly
45+weekly
46+
47+# Don't mail logs to anybody
48+nomail
49+
50+# If the log file is empty, it will not be rotated
51+notifempty
52+
53+# Number of backups that will be kept
54+# This will keep the 2 newest backups only
55+rotate 2
56+
57+# Create new empty files after rotating old ones
58+# This will create empty log files, with owner
59+# set to root, group set to sys, and permissions 664
60+create 0664 root sys
61+
62+# Compress the backups with gzip
63+compress
64+
65+# No packages own lastlog or wtmp -- rotate them here
66+/var/log/wtmp {
67+ monthly
68+ create 0664 root utmp
69+ rotate 1
70+}
71+
72+/var/log/lastlog {
73+ monthly
74+ rotate 1
75+}
76+
77+# Some packages drop log rotation info in this directory
78+# so we include any file in it.
79+include /etc/logrotate.d
80+
81+# End /etc/logrotate.conf
82+EOF
83+
84+chmod 0644 /etc/logrotate.conf
85+porg -lp+ $TARGET "\
86+touch 0644 /etc/logrotate.conf" \
87+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
88+
89+mkdir -p /etc/logrotate.d
90+
91+cat > /etc/logrotate.d/sys.log << EOF
92+/var/log/sys.log {
93+ # If the log file is larger than 100kb, rotate it
94+ size 100k
95+ rotate 5
96+ weekly
97+ postrotate
98+ /bin/killall -HUP syslogd
99+ endscript
100+}
101+EOF
102+
103+chmod 0644 /etc/logrotate.d/sys.log
104+porg -lp+ $TARGET "\
105+touch /etc/logrotate.d/sys.log" \
106+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
107+
108+cat > /etc/logrotate.d/example.log << EOF
109+file1
110+file2
111+file3 {
112+ ...
113+ postrotate
114+ ...
115+ endscript
116+}
117+EOF
118+
119+chmod 0644 /etc/logrotate.d/example.log
120+porg -lp+ $TARGET "\
121+touch /etc/logrotate.d/sample.log" \
122+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
123+
124+cat > /usr/lib/systemd/system/logrotate.service << "EOF" &&
125+[Unit]
126+Description=Runs the logrotate command
127+Documentation=man:logrotate(8)
128+DefaultDependencies=no
129+After=local-fs.target
130+Before=shutdown.target
131+
132+[Service]
133+Type=oneshot
134+RemainAfterExit=yes
135+ExecStart=/usr/sbin/logrotate /etc/logrotate.conf
136+EOF
137+cat > /usr/lib/systemd/system/logrotate.timer << "EOF" &&
138+[Unit]
139+Description=Runs the logrotate command daily at 3:00 AM
140+
141+[Timer]
142+OnCalendar=*-*-* 3:00:00
143+Persistent=true
144+
145+[Install]
146+WantedBy=timers.target
147+EOF
148+porg -lp+ $TARGET "\
149+touch /usr/lib/systemd/system/logrotate.service" \
150+ 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1
151+systemctl enable logrotate.timer
152+
153+cd ..
154+RemoveSrcDir
155+PorgingDone
156+