From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Roland Hieber <rhi@pengutronix.de>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] canfestival: port to Python 3
Date: Fri, 8 Mar 2024 08:15:59 +0100 [thread overview]
Message-ID: <Zeq7L1SVgV1x2ryw@pengutronix.de> (raw)
In-Reply-To: <20240307173212.andyaxouov6teubc@pengutronix.de>
On Thu, Mar 07, 2024 at 06:32:12PM +0100, Roland Hieber wrote:
> On Thu, Mar 07, 2024 at 04:52:05PM +0100, Michael Olbrich wrote:
> > On Tue, Feb 20, 2024 at 11:33:52AM +0100, Roland Hieber wrote:
> > > The gnosis library is extracted and moved around by the objdictgen
> > > Makefile. Extract it early and do the same moving-around in the extract
> > > stage so we can patch it in PTXdist.
> > >
> > > Not all of the Python code was ported, only enough to make the build
> > > work, which calls objdictgen.py to generate the C code for the examples.
> > > The examples are fairly extensive, so this should work for most
> > > user-supplied XML schema definitions. Of gnosis, only the XML pickle
> > > modules and the introspection module was ported since those are the only
> > > modules used by objdictgen. The test cases were mostly ignored, and some
> > > of them that test Python-specific class internals also don't apply any
> > > more since Python 3 refactored the whole type system. Also no care was
> > > taken to stay compatible with Python 1 (duh!) or Python 2.
> > >
> > > Upstream is apparently still dead, judging from the Mercurial repo (last
> > > commit in 2019), the messages in the SourceForge mailing list archive
> > > (last message in 2020, none by the authors), and the issue tracker (last
> > > in 2020, none by the authors). gnosis is a whole different can of worms
> > > which doesn't even have a publicly available repository or contact
> > > information. So no attempt was made to send the changes upstream.
> > >
> > > Remove a comment which referenced the old repository URL, which no
> > > longer exists.
> > >
> > > Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> > > ---
> > [...]
> > > diff --git a/rules/canfestival.in b/rules/canfestival.in
> > > index 3c455569e455..217c3e872ec5 100644
> > > --- a/rules/canfestival.in
> > > +++ b/rules/canfestival.in
> > > @@ -4,7 +4,7 @@
> > >
> > > config CANFESTIVAL
> > > tristate
> > > - select HOST_SYSTEM_PYTHON
> > > + select HOST_SYSTEM_PYTHON3
> > > prompt "canfestival"
> > > help
> > > CanFestival is an OpenSource CANOpen framework, licensed with GPLv2 and
> > > @@ -13,4 +13,4 @@ config CANFESTIVAL
> > > http://www.canfestival.org/
> > >
> > > STAGING: remove in PTXdist 2024.12.0
> > > - Upstream is dead and needs Python 2 to build, which is also dead.
> > > + Upstream is dead.
> >
> > You need to remove the package from staging.
>
> I thought about this, but upstream still seems dead… there are a lot of
> newer but still outdated forks all over the OSS forges too, so I'm not
> really sure what is even considered "upstream".
Move it out anyways. Staging is for stuff scheduled for removal.
> > > diff --git a/rules/canfestival.make b/rules/canfestival.make
> > > index 91d1d973ae60..09bb0b067d82 100644
> > > --- a/rules/canfestival.make
> > > +++ b/rules/canfestival.make
> > > @@ -17,7 +17,6 @@ endif
> > > #
> > > # Paths and names
> > > #
> > > -# Taken from https://hg.beremiz.org/CanFestival-3/rev/8bfe0ac00cdb
> > > CANFESTIVAL_VERSION := 3+hg20180126.794
> > > CANFESTIVAL_MD5 := c97bca1c4a81a17b1a75a1f8d068b2b3 00042e5396db4403b3feb43acc2aa1e5
> > > CANFESTIVAL := canfestival-$(CANFESTIVAL_VERSION)
> > > @@ -30,6 +29,24 @@ CANFESTIVAL_LICENSE_FILES := \
> > > file://LICENCE;md5=085e7fb76fb3fa8ba9e9ed0ce95a43f9 \
> > > file://COPYING;startline=17;endline=25;md5=2964e968dd34832b27b656f9a0ca2dbf
> > >
> > > +CANFESTIVAL_GNOSIS_SOURCE := $(CANFESTIVAL_DIR)/objdictgen/Gnosis_Utils-current.tar.gz
> > > +CANFESTIVAL_GNOSIS_DIR := $(CANFESTIVAL_DIR)/objdictgen/gnosis-tar-gz
> >
> > I think this should work:
> >
> > CANFESTIVAL_GNOSIS_DIR := $(CANFESTIVAL_DIR)/objdictgen/gnosis
> > CANFESTIVAL_GNOSIS_STRIP_LEVEL := 2
> >
> > > +
> > > +# ----------------------------------------------------------------------------
> > > +# Extract
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +$(STATEDIR)/canfestival.extract:
> > > + @$(call targetinfo)
> > > + @$(call clean, $(CANFESTIVAL_DIR))
> > > + @$(call extract, CANFESTIVAL)
> > > + @# this is what objdictgen/Makfile does, but we want to patch gnosis
> > > + @$(call extract, CANFESTIVAL_GNOSIS)
> >
> > > + @mv $(CANFESTIVAL_DIR)/objdictgen/gnosis-tar-gz/gnosis \
> > > + $(CANFESTIVAL_DIR)/objdictgen/gnosis
> >
> > ...and remove this.
> >
> > It depends a bit what's in the tarball next to gnosis.
>
> Yes, there are a lot of files in the gnosis tar.gz which would then end
> up directly in ./objdictgen/, and some of them would overwrite already
> existing files, which I wanted to prevent.
The stuff wont end up in ./objdictgen/ but in objdictgen/gnosis. The
questions is, if you're overwriting stuff there.
Michael
> - Roland
>
> > Michael
> >
> > > + @$(call patchin, CANFESTIVAL)
> > > + @$(call touch)
> > > +
> > > # ----------------------------------------------------------------------------
> > > # Prepare
> > > # ----------------------------------------------------------------------------
> > > --
> > > 2.39.2
> > >
> > >
> > >
> >
> > --
> > Pengutronix e.K. | |
> > Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
> >
>
> --
> Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
> Steuerwalder Str. 21 | https://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-03-08 7:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 10:33 Roland Hieber
2024-03-07 15:52 ` Michael Olbrich
2024-03-07 17:32 ` Roland Hieber
2024-03-08 7:15 ` Michael Olbrich [this message]
2024-03-08 7:51 ` Michael Olbrich
2024-03-12 10:31 ` [ptxdist] [PATCH v2] " Roland Hieber
2024-03-19 6:44 ` [ptxdist] [APPLIED] " Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zeq7L1SVgV1x2ryw@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
--cc=rhi@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox