Re: [Slackbuilds-users] Creating First Slackbuilds and Github

2022-03-20 Thread Jeremy Hansen
On Sun, Mar 20, 2022, 4:58 PM Ruben Schuller  wrote:

> Hi,
>
> 2022-03-20 "B. Watson" :
>
> > On Sat, 19 Mar 2022, Ruben Schuller wrote:
> > >
> > > ZIPVER="1369d247e3d2bc697892795dea8cc1713344749f"
> > >
> > > for the version I'd either go with the date like 220319 if there
> > > aren't multiple commits on that date, or with the short-hash of
> > > git:
> >
> > Recommendations... in fact I'm begging you: if you're going to use
> > a git commit, *please* include the date in YYMMDD format in your
> > VERSION number. Example:
> >
> > VERSION="20220319+1369d24"
> >
> > Notice the 4-digit year comes first... the point of doing it this way
> > is that a user can easily tell which version is newer, when looking
> > at multiple packages. If you use only the git commit hash, those are
> > effectively random, there's no sense of which is newest.
> >
> > The SlackBuild can split up the VERSION variable as needed.
> >
> > Also, while I'm thinking about it: VERSION *must* be a constant that
> > can be overridden by the environment. Example:
> >
> > VERSION=${VERSION:-3.4.1}
>
> Very good point, including the date never hurts.
>
> > *Please* don't try to get clever and do stuff like:
> >
> > COMMIT=1369d247e3d2bc697892795dea8cc1713344749f
> > VERSION="$( echo $COMMIT | head -c7 )"
>
> Note, for completeness, that the git short hash might be longer than
> seven characters because of collisions. The git command figures that
> out. Don't just shorten it :)
>

On SBo, it won't matter if there's collisions. It's simply a reference to a
version that exists on SBo. If there's collisions within the upstream repo,
it won't affect the version we have on SBo.

Jeremy

>
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



Re: [Slackbuilds-users] Creating First Slackbuilds and Github

2022-03-20 Thread Ruben Schuller
Hi,

2022-03-20 "B. Watson" :

> On Sat, 19 Mar 2022, Ruben Schuller wrote:
> >
> > ZIPVER="1369d247e3d2bc697892795dea8cc1713344749f"
> >
> > for the version I'd either go with the date like 220319 if there
> > aren't multiple commits on that date, or with the short-hash of
> > git:  
> 
> Recommendations... in fact I'm begging you: if you're going to use
> a git commit, *please* include the date in YYMMDD format in your
> VERSION number. Example:
> 
> VERSION="20220319+1369d24"
> 
> Notice the 4-digit year comes first... the point of doing it this way
> is that a user can easily tell which version is newer, when looking
> at multiple packages. If you use only the git commit hash, those are
> effectively random, there's no sense of which is newest.
> 
> The SlackBuild can split up the VERSION variable as needed.
> 
> Also, while I'm thinking about it: VERSION *must* be a constant that
> can be overridden by the environment. Example:
> 
> VERSION=${VERSION:-3.4.1}

Very good point, including the date never hurts.
 
> *Please* don't try to get clever and do stuff like:
> 
> COMMIT=1369d247e3d2bc697892795dea8cc1713344749f
> VERSION="$( echo $COMMIT | head -c7 )"

Note, for completeness, that the git short hash might be longer than
seven characters because of collisions. The git command figures that
out. Don't just shorten it :)

Cheers
Ruben

___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



Re: [Slackbuilds-users] Creating First Slackbuilds and Github

2022-03-20 Thread B. Watson




On Sat, 19 Mar 2022, Ruben Schuller wrote:


ZIPVER="1369d247e3d2bc697892795dea8cc1713344749f"

for the version I'd either go with the date like 220319 if there aren't
multiple commits on that date, or with the short-hash of git:


Recommendations... in fact I'm begging you: if you're going to use
a git commit, *please* include the date in YYMMDD format in your
VERSION number. Example:

VERSION="20220319+1369d24"

Notice the 4-digit year comes first... the point of doing it this way
is that a user can easily tell which version is newer, when looking
at multiple packages. If you use only the git commit hash, those are
effectively random, there's no sense of which is newest.

The SlackBuild can split up the VERSION variable as needed.

Also, while I'm thinking about it: VERSION *must* be a constant that
can be overridden by the environment. Example:

VERSION=${VERSION:-3.4.1}

*Please* don't try to get clever and do stuff like:

COMMIT=1369d247e3d2bc697892795dea8cc1713344749f
VERSION="$( echo $COMMIT | head -c7 )"

The reason for this is that we have scripts that check for consistency,
and VERSION in the SlackBuild has to match VERSION in the .info file
to pass the check.

For the same reason, PRGNAM has to be a constant. Don't do stuff
like this:

SRCNAM="Blah"
PRGNAM="python-$SRCNAM"

I know it looks clever, but it doesn't actually accomplish anything
useful, and it makes life harder for the admins.
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



Re: [Slackbuilds-users] Creating First Slackbuilds and Github

2022-03-19 Thread Brandon Pribula
Thanks again, Ruben!

I already had a slackbuild packaged for the latest release version. So I
followed your instructions and applied the necessary changes and tested it
and it all works. Here's how I did it:

VERSION=${VERSION:-1369d24}
TARVERSION=${TARVERSION:-1369d247e3d2bc697892795dea8cc1713344749f}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
ARCH="noarch"


rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$TARVERSION.tar.gz && mv $PRGNAM-$TARVERSION
$PRGNAM-$VERSION
cd $PRGNAM-$VERSION
chown -R root:root .

On Sat, Mar 19, 2022 at 2:07 PM Ruben Schuller  wrote:

> Hi,
>
> 2022-03-19 Brandon Pribula :
>
> > Thanks for your reply, Ruben :) That's great! I can't believe I
> > missed that before.  When I download it I get:
> >
> > nameofpackage-1369d247e3d2bc697892795dea8cc1713344749f.zip
> >
> > Is the version of the package okay like this:
> >
> > nameofpackage-*1369d247e3d2bc697892795dea8cc1713344749f*-noarch-1_SBo
>
> You'll definitively need this version to extract the zip archive, but
> you can store this in another variable in your slackbuild like
>
> ZIPVER="1369d247e3d2bc697892795dea8cc1713344749f"
>
> for the version I'd either go with the date like 220319 if there aren't
> multiple commits on that date, or with the short-hash of git:
>
> git rev-parse --short 1369d247e3d2bc697892795dea8cc1713344749f
>
> (you need to clone the git repository and execute this). You also
> find the short hash in the github UI, but it's hard to explain in a
> mail :)
>
> Cheers
> Ruben
>
>
> ___
> SlackBuilds-users mailing list
> SlackBuilds-users@slackbuilds.org
> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - https://slackbuilds.org/faq/
>
>
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



Re: [Slackbuilds-users] Creating First Slackbuilds and Github

2022-03-19 Thread Ruben Schuller
Hi,

2022-03-19 Brandon Pribula :

> Thanks for your reply, Ruben :) That's great! I can't believe I
> missed that before.  When I download it I get:
> 
> nameofpackage-1369d247e3d2bc697892795dea8cc1713344749f.zip
> 
> Is the version of the package okay like this:
> 
> nameofpackage-*1369d247e3d2bc697892795dea8cc1713344749f*-noarch-1_SBo

You'll definitively need this version to extract the zip archive, but
you can store this in another variable in your slackbuild like 

ZIPVER="1369d247e3d2bc697892795dea8cc1713344749f"

for the version I'd either go with the date like 220319 if there aren't
multiple commits on that date, or with the short-hash of git:

git rev-parse --short 1369d247e3d2bc697892795dea8cc1713344749f

(you need to clone the git repository and execute this). You also
find the short hash in the github UI, but it's hard to explain in a
mail :)

Cheers
Ruben


___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



Re: [Slackbuilds-users] Creating First Slackbuilds and Github

2022-03-19 Thread Brandon Pribula
Thanks for your reply, Ruben :) That's great! I can't believe I missed that
before.  When I download it I get:

nameofpackage-1369d247e3d2bc697892795dea8cc1713344749f.zip

Is the version of the package okay like this:

nameofpackage-*1369d247e3d2bc697892795dea8cc1713344749f*-noarch-1_SBo

Thanks again

On Sat, Mar 19, 2022 at 7:08 AM Ruben Schuller  wrote:

> Hi,
>
> 2022-03-18 Brandon Pribula :
>
> > I'm in the process of putting my first SlackBuilds together. The
> > repos are on github. The first repo has archived releases but I would
> > like to use master up to the most recent commit. And the second repo
> > only has a master and no archived releases.
>
> I'd just use the link to the archive (zip) at a certain commit of your
> choice.
>
> > I'm curious what the policy is regarding slackbuilds.org hosting
> > tarballs?
>
> SBo doesn't host source tarballs :)
>
> Cheers
> Ruben
> ___
> SlackBuilds-users mailing list
> SlackBuilds-users@slackbuilds.org
> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - https://slackbuilds.org/faq/
>
>
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



Re: [Slackbuilds-users] Creating First Slackbuilds and Github

2022-03-19 Thread Brandon Pribula
Thanks for your reply, Pritvi :) I've read the submissions page before and
maybe it's just me but I didn't see my question answered on there?

On Sat, Mar 19, 2022 at 5:09 AM Jheengut Pritvi 
wrote:

> Hi Brandon,
>
> You should consult this page first https://slackbuilds.org/guidelines/.
>
> If you have trouble , you can continue on this thread.
>
> Enjoy a good day
>
>
> Pritvi Jheengut
>
> On Sat, 19 Mar 2022 at 09:08, Brandon Pribula  wrote:
>
>> Hi,
>>
>> I'm new to creating SlackBuilds and using github so I apologize if this
>> is obvious.
>>
>> I'm in the process of putting my first SlackBuilds together. The repos
>> are on github. The first repo has archived releases but I would like to use
>> master up to the most recent commit.
>> And the second repo only has a master and no archived releases.
>>
>> I'm curious what the policy is regarding slackbuilds.org hosting
>> tarballs?
>>
>> Thanks
>>
>> ___
>> SlackBuilds-users mailing list
>> SlackBuilds-users@slackbuilds.org
>> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
>> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
>> FAQ - https://slackbuilds.org/faq/
>>
>> ___
> SlackBuilds-users mailing list
> SlackBuilds-users@slackbuilds.org
> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - https://slackbuilds.org/faq/
>
>
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



Re: [Slackbuilds-users] Creating First Slackbuilds and Github

2022-03-19 Thread Ruben Schuller
Hi,

2022-03-18 Brandon Pribula :

> I'm in the process of putting my first SlackBuilds together. The
> repos are on github. The first repo has archived releases but I would
> like to use master up to the most recent commit. And the second repo
> only has a master and no archived releases.

I'd just use the link to the archive (zip) at a certain commit of your
choice.

> I'm curious what the policy is regarding slackbuilds.org hosting
> tarballs?

SBo doesn't host source tarballs :)

Cheers
Ruben
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



Re: [Slackbuilds-users] Creating First Slackbuilds and Github

2022-03-19 Thread Jheengut Pritvi
Hi Brandon,

You should consult this page first https://slackbuilds.org/guidelines/.

If you have trouble , you can continue on this thread.

Enjoy a good day


Pritvi Jheengut

On Sat, 19 Mar 2022 at 09:08, Brandon Pribula  wrote:

> Hi,
>
> I'm new to creating SlackBuilds and using github so I apologize if this is
> obvious.
>
> I'm in the process of putting my first SlackBuilds together. The repos are
> on github. The first repo has archived releases but I would like to use
> master up to the most recent commit.
> And the second repo only has a master and no archived releases.
>
> I'm curious what the policy is regarding slackbuilds.org hosting tarballs?
>
> Thanks
>
> ___
> SlackBuilds-users mailing list
> SlackBuilds-users@slackbuilds.org
> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - https://slackbuilds.org/faq/
>
>
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



[Slackbuilds-users] Creating First Slackbuilds and Github

2022-03-18 Thread Brandon Pribula
Hi,

I'm new to creating SlackBuilds and using github so I apologize if this is 
obvious.

I'm in the process of putting my first SlackBuilds together. The repos are on 
github. The first repo has archived releases but I would like to use master up 
to the most recent commit.
And the second repo only has a master and no archived releases.

I'm curious what the policy is regarding slackbuilds.org hosting tarballs?

Thanks

___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/