Better HP-UX depot construction
This commit is contained in:
13
Makefile.in
13
Makefile.in
@@ -388,7 +388,7 @@ bindist:
|
|||||||
strip $$tdir/sudo ; \
|
strip $$tdir/sudo ; \
|
||||||
strip $$tdir/visudo ; \
|
strip $$tdir/visudo ; \
|
||||||
cd tmp.$$ARCH && tar Ocf ../sudo-$(VERSION)-$$ARCH.tar sudo-$(VERSION) && cd .. ; \
|
cd tmp.$$ARCH && tar Ocf ../sudo-$(VERSION)-$$ARCH.tar sudo-$(VERSION) && cd .. ; \
|
||||||
gzip --best sudo-$(VERSION)-$$ARCH.tar ; \
|
gzip -f --best sudo-$(VERSION)-$$ARCH.tar ; \
|
||||||
rm -rf tmp.$$ARCH ; \
|
rm -rf tmp.$$ARCH ; \
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -396,7 +396,7 @@ depot:
|
|||||||
( \
|
( \
|
||||||
tdir=tmp.depot ; \
|
tdir=tmp.depot ; \
|
||||||
mkdir $$tdir ; \
|
mkdir $$tdir ; \
|
||||||
for i in sudo visudo sudo.man visudo.man sudoers.man sudoers; do \
|
for i in sudo visudo sudo.man visudo.man sudoers.man sudoers BUGS CHANGES HISTORY LICENSE README TODO TROUBLESHOOTING UPGRADE sample.syslog.conf sample.sudoers; do \
|
||||||
if [ -f $$i ]; then \
|
if [ -f $$i ]; then \
|
||||||
cp $$i $$tdir ; \
|
cp $$i $$tdir ; \
|
||||||
elif [ -f $(srcdir)/$$i ]; then \
|
elif [ -f $(srcdir)/$$i ]; then \
|
||||||
@@ -412,15 +412,14 @@ depot:
|
|||||||
fi ; \
|
fi ; \
|
||||||
sed 's/@VERSION@/$(VERSION)/g' <$(srcdir)/sudo.psf >$$tdir/sudo.psf ; \
|
sed 's/@VERSION@/$(VERSION)/g' <$(srcdir)/sudo.psf >$$tdir/sudo.psf ; \
|
||||||
printf '#!/sbin/sh\nrm -f /usr/local/bin/sudoedit\nln /usr/local/bin/sudo /usr/local/bin/sudoedit\n' > $$tdir/sudo-exec.postinstall ; \
|
printf '#!/sbin/sh\nrm -f /usr/local/bin/sudoedit\nln /usr/local/bin/sudo /usr/local/bin/sudoedit\n' > $$tdir/sudo-exec.postinstall ; \
|
||||||
chmod 755 $$tdir/sudo-exec.postinstall ; \
|
printf '#!/sbin/sh\nrm -f /usr/local/man/man1m/sudoedit.1m\nln /usr/local/man/man1m/sudo.1m /usr/local/man/man1m/sudoedit.1m\n' > $$tdir/sudo-man.postinstall ; \
|
||||||
printf '#!/sbin/sh\nrm -f /usr/local/man/man1m/sudoedit.1m\nln /usr/local/man/man1m/sudo /usr/local/man/man1m/sudoedit.1m\n' > $$tdir/sudo-man.postinstall ; \
|
printf '#!/sbin/sh\nif [ ! -s /etc/sudoers ]; then\n\techo installing /usr/local/doc/sudo/sudoers as /etc/sudoers\n\techo use /usr/local/sbin/visudo to configure sudo\n\tcp /usr/local/doc/sudo/sudoers /etc/sudoers\n\tchmod 440 /etc/sudoers\n\tchown root:root /etc/sudoers\nfi\n' > $$tdir/sudo-config.postinstall ; \
|
||||||
chmod 755 $$tdir/sudo-man.postinstall ; \
|
chmod 755 $$tdir/sudo-exec.postinstall $$tdir/sudo-man.postinstall $$tdir/sudo-config.postinstall ; \
|
||||||
EOS ; \
|
|
||||||
strip $$tdir/sudo ; \
|
strip $$tdir/sudo ; \
|
||||||
strip $$tdir/visudo ; \
|
strip $$tdir/visudo ; \
|
||||||
cd $$tdir ; \
|
cd $$tdir ; \
|
||||||
swpackage -x target_type=tape -d ../sudo-$(VERSION).depot -s sudo.psf ; \
|
swpackage -x target_type=tape -d ../sudo-$(VERSION).depot -s sudo.psf ; \
|
||||||
cd .. ; \
|
cd .. ; \
|
||||||
gzip --best sudo-$(VERSION).depot; \
|
gzip -f --best sudo-$(VERSION).depot; \
|
||||||
rm -rf tmp.depot ; \
|
rm -rf tmp.depot ; \
|
||||||
)
|
)
|
||||||
|
27
sudo.psf
27
sudo.psf
@@ -7,8 +7,9 @@
|
|||||||
#
|
#
|
||||||
# swpackage -x target_type=tape -d sudo.depot -s sudo.psf
|
# swpackage -x target_type=tape -d sudo.depot -s sudo.psf
|
||||||
#
|
#
|
||||||
# TODO:
|
# To install, run:
|
||||||
# script to make sudoedit bin and man links
|
#
|
||||||
|
# swinstall -s sudo.depot sudo
|
||||||
#
|
#
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
#
|
#
|
||||||
@@ -62,10 +63,30 @@ product
|
|||||||
|
|
||||||
postinstall sudo-man.postinstall
|
postinstall sudo-man.postinstall
|
||||||
end
|
end
|
||||||
|
#
|
||||||
|
fileset
|
||||||
|
tag doc
|
||||||
|
title "sudo doc"
|
||||||
|
revision @VERSION@
|
||||||
|
|
||||||
|
file -m 444 -g bin -o root BUGS /usr/local/doc/sudo/BUGS
|
||||||
|
file -m 444 -g bin -o root CHANGES /usr/local/doc/sudo/CHANGES
|
||||||
|
file -m 444 -g bin -o root HISTORY /usr/local/doc/sudo/HISTORY
|
||||||
|
file -m 444 -g bin -o root LICENSE /usr/local/doc/sudo/LICENSE
|
||||||
|
file -m 444 -g bin -o root README /usr/local/doc/sudo/README
|
||||||
|
file -m 444 -g bin -o root TODO /usr/local/doc/sudo/TODO
|
||||||
|
file -m 444 -g bin -o root TROUBLESHOOTING /usr/local/doc/sudo/TROUBLESHOOTING
|
||||||
|
file -m 444 -g bin -o root UPGRADE /usr/local/doc/sudo/UPGRADE
|
||||||
|
file -m 444 -g bin -o root sample.syslog.conf /usr/local/doc/sudo/sample.syslog.conf
|
||||||
|
file -m 444 -g bin -o root sample.sudoers /usr/local/doc/sudo/sample.sudoers
|
||||||
|
end
|
||||||
|
#
|
||||||
fileset
|
fileset
|
||||||
tag config
|
tag config
|
||||||
title "sudo config files"
|
title "sudo config files"
|
||||||
revision @VERSION@
|
revision @VERSION@
|
||||||
file -m 440 -g root -o root sudoers /etc/sudoers
|
file -m 444 -g bin -o root sudoers /usr/local/doc/sudo/sudoers
|
||||||
|
|
||||||
|
postinstall sudo-config.postinstall
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user