From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 08 Mar 2024 08:16:23 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1riUSt-00DOU4-05 for lore@lore.pengutronix.de; Fri, 08 Mar 2024 08:16:23 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1riUSs-0005Br-OO; Fri, 08 Mar 2024 08:16:22 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1riUSW-0005AU-9W; Fri, 08 Mar 2024 08:16:00 +0100 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1riUSV-0055kL-Su; Fri, 08 Mar 2024 08:15:59 +0100 Received: from mol by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1riUSV-007rlB-2b; Fri, 08 Mar 2024 08:15:59 +0100 Date: Fri, 8 Mar 2024 08:15:59 +0100 From: Michael Olbrich To: Roland Hieber Message-ID: Mail-Followup-To: Roland Hieber , ptxdist@pengutronix.de References: <20240220103352.1272208-1-rhi@pengutronix.de> <20240307173212.andyaxouov6teubc@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240307173212.andyaxouov6teubc@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] [PATCH] canfestival: port to Python 3 X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false 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 > > > --- > > [...] > > > 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 |