sourceforge

Feel free to talk about anything and everything in this board.
josh4trunks
Newbie
Newbie
Posts: 30
Joined: August 25th, 2011, 10:32 am

sourceforge

Post by josh4trunks »

are official releases no longer hosted on sourceforge? I'm the maintainer of the FreeBSD port and FreeNAS plugin and wanted to know if I should migrate the port to use github from now on.
Thanks!
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: sourceforge

Post by safihre »

Github! :)
We also use the github api for the Downloads section on our website etc
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
josh4trunks
Newbie
Newbie
Posts: 30
Joined: August 25th, 2011, 10:32 am

Re: sourceforge

Post by josh4trunks »

sounds good, I'll make the changes to the port then
josh4trunks
Newbie
Newbie
Posts: 30
Joined: August 25th, 2011, 10:32 am

Re: sourceforge

Post by josh4trunks »

@safihre

Ok, mostly converted the FreeBSD port over. I noticed the locale folder does not exist in the release posted on github. Should package maintainers be generating that somehow?
User avatar
jcfp
Release Testers
Release Testers
Posts: 986
Joined: February 7th, 2008, 12:45 pm

Re: sourceforge

Post by jcfp »

josh4trunks wrote:I noticed the locale folder does not exist in the release posted on github. Should package maintainers be generating that somehow?
It is present in the SABnzbd-<version>-src.tar.gz; if you choose to use the github 'source code' tarball you'll have to regenerate the translations during build:

Code: Select all

python tools/make_mo.py
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: sourceforge

Post by safihre »

If you do use the git version, always use the master branch and not develop.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
josh4trunks
Newbie
Newbie
Posts: 30
Joined: August 25th, 2011, 10:32 am

Re: sourceforge

Post by josh4trunks »

Ok, the port will only be based on releases anyway so branch doesn't matter.

I tried running '/usr/local/bin/python2.7 /usr/ports/news/sabnzbdplus/work/sabnzbd-1.1.1/tools/make_mo.py' during our port setip, and I think an "email" folder is created but nothing else. The below is outputted.

Code: Select all

Email MO files
Create email templates from MO files
Main program MO files
Remove temporary templates
I also tried just running it directly while in that folder and I get the following...

Code: Select all

Email MO files
Compile locale/es/LC_MESSAGES/SABemail.mo

Missing "/usr/ports/news/sabnzbdplus/work/sabnzbd-1.1.1/tools/msgfmt.py". Please install this package first.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: sourceforge

Post by safihre »

You need to be in the dir so:

Code: Select all

cd /usr/ports/news/sabnzbdplus/work/sabnzbd-1.1.1
/usr/local/bin/python2.7 tools/make_mo.py
But like JCFP said, if you use the SABnzbd-<version>-src.tar.gz from our releases, the compiled translations will already be there.
https://github.com/sabnzbd/sabnzbd/releases
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
josh4trunks
Newbie
Newbie
Posts: 30
Joined: August 25th, 2011, 10:32 am

Re: sourceforge

Post by josh4trunks »

ok, so if I'm in the correct directory I get the second error I posted above related to msgfmt.py
any idea what I could be missing?

yeah, I may just use the build you just want to see if using the source directly is possible as well. Thanks
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: sourceforge

Post by safihre »

The error is pretty clear isn't it? Install msgfmt....
It's in the python-gettext.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
josh4trunks
Newbie
Newbie
Posts: 30
Joined: August 25th, 2011, 10:32 am

Re: sourceforge

Post by josh4trunks »

whoops sorry, I could tell it was saying to install a dependency. I though it was saying to install that file which already existed.

ok I'll try this out soon
josh4trunks
Newbie
Newbie
Posts: 30
Joined: August 25th, 2011, 10:32 am

Re: sourceforge

Post by josh4trunks »

Ok I installed the freebsd port py27-python-gettext
http://www.freshports.org/textproc/py-python-gettext/

But, I still get the same error as earlier.

Code: Select all

Missing "/usr/ports/news/sabnzbdplus/work/sabnzbd-1.1.1/tools/msgfmt.py". Please install this package first.
nahun
Newbie
Newbie
Posts: 3
Joined: January 2nd, 2017, 8:40 pm

Re: sourceforge

Post by nahun »

josh4trunks wrote:Ok I installed the freebsd port py27-python-gettext
http://www.freshports.org/textproc/py-python-gettext/

But, I still get the same error as earlier.

Code: Select all

Missing "/usr/ports/news/sabnzbdplus/work/sabnzbd-1.1.1/tools/msgfmt.py". Please install this package first.
Hey Josh, I ran into this thread after trying to find out why the sabnzbd port on FreeBSD still used sourceforge. Anyway, there are a couple ways you can start using GitHub in the port.
  1. Use sabnzbd's official tarball release
    Like JCFP and Safihre mentioned, the SABnzbd-<version>-src.tar.gz on the https://github.com/sabnzbd/sabnzbd/releases page already has the compiled translations so you don't have to make them. The problem is that it appears the FreeBSD Ports system doesn't have a builtin way to download those released tarballs. But we can just set the MASTER_SITES to the URL and it works fine. Here is a diff of the Makefile that I tested that works with Github:

    Code: Select all

    --- ../sabnzbdplus.orig/Makefile        2016-12-29 03:15:49.991222000 +0000
    +++ Makefile    2017-01-03 00:35:14.421137000 +0000
    @@ -1,10 +1,11 @@
     # $FreeBSD: head/news/sabnzbdplus/Makefile 425481 2016-11-06 10:49:03Z riggs $
    
     PORTNAME=      sabnzbdplus
    -PORTVERSION=   1.1.0
    -PORTREVISION=  1
    +PORTVERSION=   1.1.1
     CATEGORIES=    news
    -MASTER_SITES=  SF
    +GH_ACCOUNT=     sabnzbd
    +GH_PROJECT=     sabnzbd
    +MASTER_SITES=   https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/${PORTVERSION}/
     DISTNAME=      SABnzbd-${PORTVERSION}-src
    
     MAINTAINER=    [email protected]
    Obviously you can substitute GH_ACCOUNT and GH_PROJECT with whatever variable names you think is appropriate, I just felt like using the same naming scheme.
  2. Use the github 'source code' tarball
    Once you download the this tarball you'll need to compile the translations and the problem you're having is because the tools/msgfmt.py file is trying to use `python` as the interpreter when FreeBSD doesn't add that by default. You'll probably want to patch that file so it uses python2.7. Also, you don't need to install py27-python-gettext. Here is a diff that shows what I mean:

    Code: Select all

    --- msgfmt.py.old	2017-01-03 01:56:31.467695000 +0000
    +++ msgfmt.py	2017-01-03 01:54:57.540577000 +0000
    @@ -1,4 +1,4 @@
    -#! /usr/bin/env python
    +#! /usr/bin/env python2.7
     # -*- coding: iso-8859-1 -*-
     # Written by Martin v. L�wis <[email protected]>
     
Let me know if I can help anymore. I'd love the FreeBSD package/port to keep up to date with what is on GitHub.
josh4trunks
Newbie
Newbie
Posts: 30
Joined: August 25th, 2011, 10:32 am

Re: sourceforge

Post by josh4trunks »

Hi @safihre I was wondering if you could help us with one more issue with the FreeBSD port/package?

Thanks to @nahun we now have the port building the locale files from github's source, but this caused another small issue. The sabnzbd/verson.py file is now not up to date. Is there a proper way to get the version/baseline variable replaced in this file? I'm not sure what setup.py the file is referring to.
Thanks!
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: sourceforge

Post by safihre »

Clearly you skipped over mine, JCFP's and @nahun's first advice:
Use the official tarball releases.

Why would you possibly be pulling from the develop branch for a port/package? ???

If you keep insisting to go against our advice of using the official releases that everything you need inside, you should use the master branch and of course not the develop branch.
In the master branch we only put stable releases and the version info is set.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply