From: Todd C. Miller Date: Sun, 26 Sep 2004 16:33:31 +0000 (+0000) Subject: Better HP-UX depot construction X-Git-Tag: SUDO_1_7_0~944 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b8ff2e455f8596f655dd1784e8da1ea46d561d1;p=sudo Better HP-UX depot construction --- diff --git a/Makefile.in b/Makefile.in index e5b3979db..ce97acbb9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -388,7 +388,7 @@ bindist: strip $$tdir/sudo ; \ strip $$tdir/visudo ; \ 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 ; \ ) @@ -396,7 +396,7 @@ depot: ( \ tdir=tmp.depot ; \ 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 \ cp $$i $$tdir ; \ elif [ -f $(srcdir)/$$i ]; then \ @@ -412,15 +412,14 @@ depot: fi ; \ 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 ; \ - chmod 755 $$tdir/sudo-exec.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 ; \ - chmod 755 $$tdir/sudo-man.postinstall ; \ -EOS ; \ + 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\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-exec.postinstall $$tdir/sudo-man.postinstall $$tdir/sudo-config.postinstall ; \ strip $$tdir/sudo ; \ strip $$tdir/visudo ; \ cd $$tdir ; \ swpackage -x target_type=tape -d ../sudo-$(VERSION).depot -s sudo.psf ; \ cd .. ; \ - gzip --best sudo-$(VERSION).depot; \ + gzip -f --best sudo-$(VERSION).depot; \ rm -rf tmp.depot ; \ ) diff --git a/sudo.psf b/sudo.psf index e2e9b06b3..5688b4538 100644 --- a/sudo.psf +++ b/sudo.psf @@ -7,8 +7,9 @@ # # swpackage -x target_type=tape -d sudo.depot -s sudo.psf # -# TODO: -# script to make sudoedit bin and man links +# To install, run: +# +# swinstall -s sudo.depot sudo # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @@ -62,10 +63,30 @@ product postinstall sudo-man.postinstall 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 tag config title "sudo config files" 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