]> granicus.if.org Git - sudo/commitdiff
Better HP-UX depot construction
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 26 Sep 2004 16:33:31 +0000 (16:33 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 26 Sep 2004 16:33:31 +0000 (16:33 +0000)
Makefile.in
sudo.psf

index e5b3979db057d8beb699e557341a58bf3d853e7b..ce97acbb9f578f62aaa174a57f74c15f29c8428b 100644 (file)
@@ -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 ; \
        )
index e2e9b06b3cdd112d14e67134909e5c5fba3c7e46..5688b4538356c63fd2e7b4628cfcbd51e7977531 100644 (file)
--- 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