# unable to download ports using portsnap fetch by remote server



## srchi (Apr 8, 2021)

I'm trying to download ports(from remote server) using portsnap fetch but im getting error like "portsnap fetch should not be run non-interactively. Run portsnap cron instead". but i tried portsnap cron im able to download the compressed content inside /var/db/portsnap but seems its not the valid data. ive checked mail the output sees as per screenshot. kindly give suggestion how to download the ports from remote server.


----------



## bagas (Apr 8, 2021)

Ports transitioned to git.
					

Last SVN commit to the ports tree:  https://svnweb.freebsd.org/ports?view=revision&revision=569609  So make sure to change your local ports trees if you've been using subversion to update it. portsnap users should not be impacted by this change.




					forums.freebsd.org
				



ports switched to git.


----------



## SirDice (Apr 8, 2021)

bagas said:


> ports switched to git.


Irrelevant for portsnap(8) users.

srchi Please don't post _pictures_ of text output. They're impossible to copy/paste from. 

As for the error, it looks like something got corrupted. Run `rm -rf /var/db/portsnap/*` to clear out the cache directory. The run `portsnap fetch` again.


----------



## srchi (Apr 8, 2021)

portsnap cron is working but need to wait 5-8min to complete the download. may be i was checking mail incomplete download. i ran again waited for 8min then portsnap extract


----------



## recluce (Apr 9, 2021)

SirDice said:


> Irrelevant for portsnap(8) users.
> 
> srchi Please don't post _pictures_ of text output. They're impossible to copy/paste from.
> 
> As for the error, it looks like something got corrupted. Run `rm -rf /var/db/portsnap/*` to clear out the cache directory. The run `portsnap fetch` again.


Is it? I have observed for a while now that the ports tree has become static with portsnap (or svn, for that matter). The only resolution is to switch to git, which appears not even to be fully documented. Not impressed with the way the project handled this switch.


----------



## richardtoohey2 (Apr 9, 2021)

It's been a bit of a bump ... but as a ports user (portsnap & portmaster) it boiled down to

```
cd /usr/ports/net/gitup
make install
<change gitup.conf to non-github version>
cd /usr
mv ports old-ports
mkdir ports
gitup ports
pkg version -vL=
portmaster -a
```
And since that, just

```
gitup ports
pkg version -vL=
portmaster -a
```

Seems to be working OK so far, and performance on par with portsnap (svnlite seemed a LOT slower, so I'm glad gitup is OK).

EDIT - And to try and tame the don't-use-portmaster crowd - the above is NOT recommended, especially if you are a new user.  Use the pkg system and binary packages - don't touch ports unless you have to or want to.

I was planning on staying on portsnap, but gitup has so far been pretty painless, so I might as well make the move now.


----------



## SirDice (Apr 9, 2021)

recluce said:


> Is it? I have observed for a while now that the ports tree has become static with portsnap (or svn, for that matter).


The entire ports tree was more or less "frozen" for a few days. So yes, portsnap is going to be frozen too. If there are no changes in the ports tree then there isn't much for portsnap to make a diff from now is it?



recluce said:


> The only resolution is to switch to git


No, it's not. If you previously used subversion, then yes. 



recluce said:


> Not impressed with the way the project handled this switch.


Send your complaints to freebsd-ports@. Nobody on the forums can do anything about it.


----------



## srchi (Apr 13, 2021)

richardtoohey2 said:


> It's been a bit of a bump ... but as a ports user (portsnap & portmaster) it boiled down to
> 
> ```
> cd /usr/ports/net/gitup
> ...


I'm getting below issue after doing make install

```
make: "/usr/share/mk/bsd.port.mk" line 32: Cannot open /usr/ports/Mk/bsd.port.mk
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/ports/net/gitup
```


----------



## SirDice (Apr 13, 2021)

I suggest you use the packages. Do you have good reason to build from ports in the first place?


----------



## srchi (Apr 13, 2021)

SirDice said:


> I suggest you use the packages. Do you have good reason to build from ports in the first place?


we are building custom embedded OS.


----------



## SirDice (Apr 13, 2021)

Then I would recommend setting up ports-mgmt/poudriere or ports-mgmt/synth and build your own package repositories.


----------



## richardtoohey2 (Apr 13, 2021)

Maybe you have hit this? https://forums.freebsd.org/threads/...-the-directory-usr-ports-mk.79812/post-505961


----------

