On Sat, Mar 21, 2020 at 02:26:18PM +0530, putridsou...@gmail.com wrote: > I'm have never tried the ports system before. > I have read through the faq and the man pages, > but I get stuck at building dependencies. > I follow through the fetch,checksum steps and then > for 'make prepare' as local user, > I'm greeted with following message. > This is for the 'rsnapshot' package > > ===> Building package for rsync-3.1.3 > Create /usr/ports/packages/amd64/all/rsync-3.1.3.tgz > Creating package rsync-3.1.3 > Link to /usr/ports/packages/amd64/ftp/rsync-3.1.3.tgz > ===> Cleaning for rsync-3.1.3 > ===> Verifying specs: c > ===> found c.95.1 > ===> Installing rsync-3.1.3 from /usr/ports/packages/amd64/all/ > pkg_add: pkg_add must be run as root > *** Error 1 in /usr/ports/net/rsync > (/usr/ports/infrastructure/mk/bsd.port.mk:2028 > '/var/db/pkg/rsync-3.1.3/+CONTENTS': @/usr/bin/env -i PKG...) > *** Error 1 in /usr/ports/net/rsync > (/usr/ports/infrastructure/mk/bsd.port.mk:2451 'install') > *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2135 > '/usr/ports/pobj/rsnapshot-1.4.2/.dep-net-rsync') > *** Error 1 in /usr/ports/net/rsnapshot > (/usr/ports/infrastructure/mk/bsd.port.mk:2451 'prepare') > > I have successfully installed programs > with no dependencies using command > 'doas make install' as the final step, > after fetch,patch,gen,configure,etc. > Is this the right way? > > Why doesn't a make install command as a local user > while in 'net/rsnapshot' call doas on it's own? >
make install, make update, pkg_add are basically the same thing. doas will follow what is set as ok in /etc/doas.conf doas itself is a much improved version of sudo. sudo is in packages if you want it for some other port, but doas is better. /etc/mk.conf has SUDO=doas which reflects the past usage of sudo before doas was created. OpenBSD has a lot of distinguishing characteristics different than other OS's. One high priority is security. Installing software means that only a user given the right to do so, may do it. If you have no /etc/doas.conf allowing any user to act as root, then no one else except root can install programs. Having anything that overrides that is disastrous for security. evil_user $ make install my_erase_all_files_malware would really be a bit of a problem. evil_user $ doas pkg_add my_erase_all_files_malware will fail unless you have mistakenly given evil_user such broad powers. Please read and re-read all of the manual pages involved. doas doas.conf mk.conf bsd.port.mk pkg_add, pkg_create, pkg_ anything. The main site has a man page program that you can setup to give you the proper (base system) man pages online for whichever version of OpenBSD you are running. also, if you haven't, read all those links on the home page. Search the mailing list history too. https://marc.info and many other sites. Personally, I have found doing general searches about OpenBSD to not be very helpful. The information is often very old or not useful. Your reults may vary. You can do everything with any port except install it. Play around with building and testing and all the different make clean variations. When you hit a dependency that insn't installed, then you would need to use doas manually. Have fun! Chris Bennett