Issue with proper packaging

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with proper packaging

Konstantin Gizdov
Hi,

I'm having trouble making a package under the Arch Packaging Standards. The
package in question is `simpletools`.

The problem I'm having is that if I use `prepare()` & `build()` directives
as intended, then the target `make install` does not exist when called from
inside `package()` directive. I'm wondering if this is an issue because of
the way `makepkg` pulls it over git and later handles it, or is it some
problem with the CMake configuration in the software itself?

I haven't been able to replicate this in a manual way, because obviously
when run manually the configuration is persisted locally. Any comments?

--
Regards,
Konstantin
Reply | Threaded
Open this post in threaded view
|

Re: Issue with proper packaging

tur-users mailing list
Le 21/02/2018 à 13:55, Konstantin Gizdov a écrit :

> Hi,
>
> I'm having trouble making a package under the Arch Packaging Standards. The
> package in question is `simpletools`.
>
> The problem I'm having is that if I use `prepare()` & `build()` directives
> as intended, then the target `make install` does not exist when called from
> inside `package()` directive. I'm wondering if this is an issue because of
> the way `makepkg` pulls it over git and later handles it, or is it some
> problem with the CMake configuration in the software itself?
>
> I haven't been able to replicate this in a manual way, because obviously
> when run manually the configuration is persisted locally. Any comments?
>
> --
> Regards,
> Konstantin
Can you provide the new PKGBUILD so we can see what is wrong? I guess
the issue is you are not replacing makepkg at the right place in each
function.

Note that makepkg will indeed start in ${srcdir} at the beginning of
each PKGBUILD functions (`prepare()`, `build()`, `package()`, `check()`).

Regards,
Bruno


signature.asc (531 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Issue with proper packaging

Michael Kogan
I think, Konstantin refers to
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=simpletools

Konstantin, I think, you are missing the make command (at least I only see
cmake and make install commands. It should look something like

build() {
    mkdir -p "${srcdir}/${pkgname}/build"
    cd "${srcdir}/${pkgname}/build"
    msg2 'Configuring...'
    cmake -C "${srcdir}/settings.cmake" "${srcdir}/${pkgname}"
        make
}


package() {
    # make install target is lost if done in prepare() or build()
    # do everything here...
    install -d "${pkgdir}/usr/lib/"
    msg2 'Compiling & Installing...'
    make DESTDIR="${pkgdir}" install

   # further commands

}

I haven't tested it though, because root has a lot of dependencies.

2018-02-21 14:14 GMT+01:00 Bruno Pagani via aur-general <
[hidden email]>:

> Le 21/02/2018 à 13:55, Konstantin Gizdov a écrit :
>
> > Hi,
> >
> > I'm having trouble making a package under the Arch Packaging Standards.
> The
> > package in question is `simpletools`.
> >
> > The problem I'm having is that if I use `prepare()` & `build()`
> directives
> > as intended, then the target `make install` does not exist when called
> from
> > inside `package()` directive. I'm wondering if this is an issue because
> of
> > the way `makepkg` pulls it over git and later handles it, or is it some
> > problem with the CMake configuration in the software itself?
> >
> > I haven't been able to replicate this in a manual way, because obviously
> > when run manually the configuration is persisted locally. Any comments?
> >
> > --
> > Regards,
> > Konstantin
>
> Can you provide the new PKGBUILD so we can see what is wrong? I guess
> the issue is you are not replacing makepkg at the right place in each
> function.
>
> Note that makepkg will indeed start in ${srcdir} at the beginning of
> each PKGBUILD functions (`prepare()`, `build()`, `package()`, `check()`).
>
> Regards,
> Bruno
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Issue with proper packaging

tur-users mailing list
In reply to this post by tur-users mailing list
On 21 February 2018 at 13:14, Bruno Pagani via aur-general
<[hidden email]> wrote:

> Le 21/02/2018 à 13:55, Konstantin Gizdov a écrit :
>
>> Hi,
>>
>> I'm having trouble making a package under the Arch Packaging Standards. The
>> package in question is `simpletools`.
>>
>> The problem I'm having is that if I use `prepare()` & `build()` directives
>> as intended, then the target `make install` does not exist when called from
>> inside `package()` directive. I'm wondering if this is an issue because of
>> the way `makepkg` pulls it over git and later handles it, or is it some
>> problem with the CMake configuration in the software itself?
>>
>> I haven't been able to replicate this in a manual way, because obviously
>> when run manually the configuration is persisted locally. Any comments?
>>
>> --
>> Regards,
>> Konstantin
>
> Can you provide the new PKGBUILD so we can see what is wrong? I guess
> the issue is you are not replacing makepkg at the right place in each
> function.
>
> Note that makepkg will indeed start in ${srcdir} at the beginning of
> each PKGBUILD functions (`prepare()`, `build()`, `package()`, `check()`).
>
> Regards,
> Bruno
>

Your package appears to pull directly from git and not a specific
release so it should probably be named `-git` and include a `pkgver()`
function.
Reply | Threaded
Open this post in threaded view
|

Re: Issue with proper packaging

Konstantin Gizdov
In reply to this post by tur-users mailing list
Hi Bruno,

Yeah, my bad. Forgot to add `cd "${srcdir}/${pkgname}/build"` in the
`pacakge()` directive. It all works now.

Regards,
Konstantin

On Wed, Feb 21, 2018 at 2:14 PM, Bruno Pagani via aur-general <
[hidden email]> wrote:

> Le 21/02/2018 à 13:55, Konstantin Gizdov a écrit :
>
> > Hi,
> >
> > I'm having trouble making a package under the Arch Packaging Standards.
> The
> > package in question is `simpletools`.
> >
> > The problem I'm having is that if I use `prepare()` & `build()`
> directives
> > as intended, then the target `make install` does not exist when called
> from
> > inside `package()` directive. I'm wondering if this is an issue because
> of
> > the way `makepkg` pulls it over git and later handles it, or is it some
> > problem with the CMake configuration in the software itself?
> >
> > I haven't been able to replicate this in a manual way, because obviously
> > when run manually the configuration is persisted locally. Any comments?
> >
> > --
> > Regards,
> > Konstantin
>
> Can you provide the new PKGBUILD so we can see what is wrong? I guess
> the issue is you are not replacing makepkg at the right place in each
> function.
>
> Note that makepkg will indeed start in ${srcdir} at the beginning of
> each PKGBUILD functions (`prepare()`, `build()`, `package()`, `check()`).
>
> Regards,
> Bruno
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Issue with proper packaging

Konstantin Gizdov
In reply to this post by Michael Kogan
Hi Michael,

You are looking probably at the incorrect version of the package on AUR.
But anyway, that was not the issue. I forgot to `cd` in to the correct
folder.

Regards,
Konstantin

On Wed, Feb 21, 2018 at 2:18 PM, Michael Kogan <[hidden email]>
wrote:

> I think, Konstantin refers to
> https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=simpletools
>
> Konstantin, I think, you are missing the make command (at least I only see
> cmake and make install commands. It should look something like
>
> build() {
>     mkdir -p "${srcdir}/${pkgname}/build"
>     cd "${srcdir}/${pkgname}/build"
>     msg2 'Configuring...'
>     cmake -C "${srcdir}/settings.cmake" "${srcdir}/${pkgname}"
>         make
> }
>
>
> package() {
>     # make install target is lost if done in prepare() or build()
>     # do everything here...
>     install -d "${pkgdir}/usr/lib/"
>     msg2 'Compiling & Installing...'
>     make DESTDIR="${pkgdir}" install
>
>    # further commands
>
> }
>
> I haven't tested it though, because root has a lot of dependencies.
>
> 2018-02-21 14:14 GMT+01:00 Bruno Pagani via aur-general <
> [hidden email]>:
>
> > Le 21/02/2018 à 13:55, Konstantin Gizdov a écrit :
> >
> > > Hi,
> > >
> > > I'm having trouble making a package under the Arch Packaging Standards.
> > The
> > > package in question is `simpletools`.
> > >
> > > The problem I'm having is that if I use `prepare()` & `build()`
> > directives
> > > as intended, then the target `make install` does not exist when called
> > from
> > > inside `package()` directive. I'm wondering if this is an issue because
> > of
> > > the way `makepkg` pulls it over git and later handles it, or is it some
> > > problem with the CMake configuration in the software itself?
> > >
> > > I haven't been able to replicate this in a manual way, because
> obviously
> > > when run manually the configuration is persisted locally. Any comments?
> > >
> > > --
> > > Regards,
> > > Konstantin
> >
> > Can you provide the new PKGBUILD so we can see what is wrong? I guess
> > the issue is you are not replacing makepkg at the right place in each
> > function.
> >
> > Note that makepkg will indeed start in ${srcdir} at the beginning of
> > each PKGBUILD functions (`prepare()`, `build()`, `package()`, `check()`).
> >
> > Regards,
> > Bruno
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Issue with proper packaging

Konstantin Gizdov
In reply to this post by tur-users mailing list
Hi Morgan,

Indeed on the surface it looks that way. The dev does not explicitly make
releases anymore for some reason, but I work with him and I know which
commits are actually supposed to be releases and only choose those.

Regards,
Konstantin

On Wed, Feb 21, 2018 at 2:19 PM, Morgan Adamiec via aur-general <
[hidden email]> wrote:

> On 21 February 2018 at 13:14, Bruno Pagani via aur-general
> <[hidden email]> wrote:
> > Le 21/02/2018 à 13:55, Konstantin Gizdov a écrit :
> >
> >> Hi,
> >>
> >> I'm having trouble making a package under the Arch Packaging Standards.
> The
> >> package in question is `simpletools`.
> >>
> >> The problem I'm having is that if I use `prepare()` & `build()`
> directives
> >> as intended, then the target `make install` does not exist when called
> from
> >> inside `package()` directive. I'm wondering if this is an issue because
> of
> >> the way `makepkg` pulls it over git and later handles it, or is it some
> >> problem with the CMake configuration in the software itself?
> >>
> >> I haven't been able to replicate this in a manual way, because obviously
> >> when run manually the configuration is persisted locally. Any comments?
> >>
> >> --
> >> Regards,
> >> Konstantin
> >
> > Can you provide the new PKGBUILD so we can see what is wrong? I guess
> > the issue is you are not replacing makepkg at the right place in each
> > function.
> >
> > Note that makepkg will indeed start in ${srcdir} at the beginning of
> > each PKGBUILD functions (`prepare()`, `build()`, `package()`, `check()`).
> >
> > Regards,
> > Bruno
> >
>
> Your package appears to pull directly from git and not a specific
> release so it should probably be named `-git` and include a `pkgver()`
> function.
>
Reply | Threaded
Open this post in threaded view
|

Re: Issue with proper packaging

tur-users mailing list
On 21 February 2018 at 13:37, Konstantin Gizdov <[hidden email]> wrote:

> Hi Morgan,
>
> Indeed on the surface it looks that way. The dev does not explicitly make
> releases anymore for some reason, but I work with him and I know which
> commits are actually supposed to be releases and only choose those.
>
> Regards,
> Konstantin
>
> On Wed, Feb 21, 2018 at 2:19 PM, Morgan Adamiec via aur-general <
> [hidden email]> wrote:
>
>> On 21 February 2018 at 13:14, Bruno Pagani via aur-general
>> <[hidden email]> wrote:
>> > Le 21/02/2018 à 13:55, Konstantin Gizdov a écrit :
>> >
>> >> Hi,
>> >>
>> >> I'm having trouble making a package under the Arch Packaging Standards.
>> The
>> >> package in question is `simpletools`.
>> >>
>> >> The problem I'm having is that if I use `prepare()` & `build()`
>> directives
>> >> as intended, then the target `make install` does not exist when called
>> from
>> >> inside `package()` directive. I'm wondering if this is an issue because
>> of
>> >> the way `makepkg` pulls it over git and later handles it, or is it some
>> >> problem with the CMake configuration in the software itself?
>> >>
>> >> I haven't been able to replicate this in a manual way, because obviously
>> >> when run manually the configuration is persisted locally. Any comments?
>> >>
>> >> --
>> >> Regards,
>> >> Konstantin
>> >
>> > Can you provide the new PKGBUILD so we can see what is wrong? I guess
>> > the issue is you are not replacing makepkg at the right place in each
>> > function.
>> >
>> > Note that makepkg will indeed start in ${srcdir} at the beginning of
>> > each PKGBUILD functions (`prepare()`, `build()`, `package()`, `check()`).
>> >
>> > Regards,
>> > Bruno
>> >
>>
>> Your package appears to pull directly from git and not a specific
>> release so it should probably be named `-git` and include a `pkgver()`
>> function.
>>

If you work with the dev maybe convince him to tag the commits? Still
I can not see where the pkgbuild chooses the correct commit. Maybe you
should change the source array to.
`source=("${pkgname}::git+https://github.com/cofitzpa/simpletools#commit=COMMITHASH"`.
Reply | Threaded
Open this post in threaded view
|

Re: Issue with proper packaging

Ankit R Gadiya
In reply to this post by Konstantin Gizdov
Hey,

But anybody using the package is pulling the git repository and so it
automatically uses the master HEAD, and I don't see any command in
prepare() for choosing the commits.

On 02/21/2018 07:07 PM, Konstantin Gizdov wrote:

> Hi Morgan,
>
> Indeed on the surface it looks that way. The dev does not explicitly make
> releases anymore for some reason, but I work with him and I know which
> commits are actually supposed to be releases and only choose those.
>
> Regards,
> Konstantin
>
> On Wed, Feb 21, 2018 at 2:19 PM, Morgan Adamiec via aur-general <
> [hidden email]> wrote:
>
>> On 21 February 2018 at 13:14, Bruno Pagani via aur-general
>> <[hidden email]> wrote:
>>> Le 21/02/2018 à 13:55, Konstantin Gizdov a écrit :
>>>
>>>> Hi,
>>>>
>>>> I'm having trouble making a package under the Arch Packaging Standards.
>> The
>>>> package in question is `simpletools`.
>>>>
>>>> The problem I'm having is that if I use `prepare()` & `build()`
>> directives
>>>> as intended, then the target `make install` does not exist when called
>> from
>>>> inside `package()` directive. I'm wondering if this is an issue because
>> of
>>>> the way `makepkg` pulls it over git and later handles it, or is it some
>>>> problem with the CMake configuration in the software itself?
>>>>
>>>> I haven't been able to replicate this in a manual way, because obviously
>>>> when run manually the configuration is persisted locally. Any comments?
>>>>
>>>> --
>>>> Regards,
>>>> Konstantin
>>>
>>> Can you provide the new PKGBUILD so we can see what is wrong? I guess
>>> the issue is you are not replacing makepkg at the right place in each
>>> function.
>>>
>>> Note that makepkg will indeed start in ${srcdir} at the beginning of
>>> each PKGBUILD functions (`prepare()`, `build()`, `package()`, `check()`).
>>>
>>> Regards,
>>> Bruno
>>>
>>
>> Your package appears to pull directly from git and not a specific
>> release so it should probably be named `-git` and include a `pkgver()`
>> function.
>>

--
From: Ankit R Gadiya <https://ankitrgadiya.in>
Reply | Threaded
Open this post in threaded view
|

Re: Issue with proper packaging

Konstantin Gizdov
Yeah, forgot about that too... I guess one of those days. Fixed now. Thanks
for the help.

Regards,
Konstantin

On Wed, Feb 21, 2018 at 2:43 PM, Ankit R Gadiya <[hidden email]> wrote:

> Hey,
>
> But anybody using the package is pulling the git repository and so it
> automatically uses the master HEAD, and I don't see any command in
> prepare() for choosing the commits.
>
>
> On 02/21/2018 07:07 PM, Konstantin Gizdov wrote:
>
>> Hi Morgan,
>>
>> Indeed on the surface it looks that way. The dev does not explicitly make
>> releases anymore for some reason, but I work with him and I know which
>> commits are actually supposed to be releases and only choose those.
>>
>> Regards,
>> Konstantin
>>
>> On Wed, Feb 21, 2018 at 2:19 PM, Morgan Adamiec via aur-general <
>> [hidden email]> wrote:
>>
>> On 21 February 2018 at 13:14, Bruno Pagani via aur-general
>>> <[hidden email]> wrote:
>>>
>>>> Le 21/02/2018 à 13:55, Konstantin Gizdov a écrit :
>>>>
>>>> Hi,
>>>>>
>>>>> I'm having trouble making a package under the Arch Packaging Standards.
>>>>>
>>>> The
>>>
>>>> package in question is `simpletools`.
>>>>>
>>>>> The problem I'm having is that if I use `prepare()` & `build()`
>>>>>
>>>> directives
>>>
>>>> as intended, then the target `make install` does not exist when called
>>>>>
>>>> from
>>>
>>>> inside `package()` directive. I'm wondering if this is an issue because
>>>>>
>>>> of
>>>
>>>> the way `makepkg` pulls it over git and later handles it, or is it some
>>>>> problem with the CMake configuration in the software itself?
>>>>>
>>>>> I haven't been able to replicate this in a manual way, because
>>>>> obviously
>>>>> when run manually the configuration is persisted locally. Any comments?
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Konstantin
>>>>>
>>>>
>>>> Can you provide the new PKGBUILD so we can see what is wrong? I guess
>>>> the issue is you are not replacing makepkg at the right place in each
>>>> function.
>>>>
>>>> Note that makepkg will indeed start in ${srcdir} at the beginning of
>>>> each PKGBUILD functions (`prepare()`, `build()`, `package()`,
>>>> `check()`).
>>>>
>>>> Regards,
>>>> Bruno
>>>>
>>>>
>>> Your package appears to pull directly from git and not a specific
>>> release so it should probably be named `-git` and include a `pkgver()`
>>> function.
>>>
>>>
> --
> From: Ankit R Gadiya <https://ankitrgadiya.in>
>