Re: [fpc-other] How to modify install scripts when svn disappeared?
On Wed, 11 Aug 2021 14:36:23 +0200, Bo Berglund via fpc-other wrote: >Please advice how to: >1) Find which is the latest release tag of fpc and lazarus >2) Retrieve the full sources for that tag on the command line > Sorry, sent this to the wrong newsgroup, should not have been "social"... I will retry in the correct place. -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
[fpc-other] How to modify install scripts when svn disappeared?
I have for many years now been using an install script to get the sources of fpc and lazarus via svn based on the specific tags. Then the script installs the needed dependencies and makes the complete installation on Raspberry Pi boxes. Now I have two problems: 1) The svn server seems to be down so the source retrieval does not work 2) I cannot find any tutorial on how to proceed with modifications of scripts to move from svn to gitlab. Please advice how to: 1) Find which is the latest release tag of fpc and lazarus 2) Retrieve the full sources for that tag on the command line As soon as I have the sources I believe the rest of my script will work just fine... The retrieval lines in my script read as follows: echo "Downloading version $FPCVER of FPC" cd "$FPCDIR" svn co https://svn.freepascal.org/svn/fpc/tags/$FPCTAG/ $FPCVER echo "Downloading version $LAZVER of Lazarus" cd "$LAZDIR" svn co https://svn.freepascal.org/svn/lazarus/tags/$LAZTAG/ $LAZVER What could I replace these svn calls with? I have not used git for anything else than to download a specific code base for a utility from github. All of my developing is versioned via subversion... -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] GIT versioning server on Raspberry Pi?
Report on progress: I have found a way to convert CVS to GIT using the cvs2svn module, which contains a cvs2git file. It was described in this article: https://devsector.wordpress.com/2014/05/17/migrate-cvs-to-git-with-cvs2svn/ Since our CVS server resides on Windows and is driven by CVSNT and the conversion process (a Python system) uses the cvs executable to extract revision information from the version files I decided to give it a try on Windows7. After some misunderstandings causing me to restart the conversions I finally managed to convert some test projects. But there is one very strange thing happening: After the conversion is done according to the steps in the article this happens when I run a check on the created GIT repo: $ git status On branch master Changes to be committed: (use "git reset HEAD ..." to unstage) deleted:SSM1/ReadMe.txt Why is the repo in this condition? And what to do about it? Obviously going over it with git reset HEAD ... isn't really practical since this example project (an Android App) contains deeply nested folder trees with hundreds of files. I am worrying that I am doing this all wrong... It is possible to clone the repo and get the expected file tree out, though. Another issue is that it seems like the conversion of a CVS repository consisting of many different modules ("projects" if you will) ends up with a single huge GIT repo which can only be cloned in its entirety... How can one store multiple and *separate* projects in GIT? -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] GIT versioning server on Raspberry Pi?
On Fri, 2 Jun 2017 10:19:49 +0100, Graeme Geldenhuys <mailingli...@geldenhuys.co.uk> wrote: >On 2017-06-02 00:00, Bo Berglund wrote: >> The beauty of this is that we do not need to duplicate common >> functionality between projects as would be the case if we *copied* the >> common files into the source folder. These files are used in many >> places but versioned in a single place on the server. > >Yes, Git has that functionality too. It is called "submodules". Common >code can live and be maintained in it's own repository. Other >repositories can than link to that repository. > > https://git-scm.com/book/en/v2/Git-Tools-Submodules > > https://git-scm.com/docs/git-submodule > >I have used this often. If you clone a repository that makes use of >submodules, all the information is already there (stored inside the >repository). > >The first time you clone such a repository, it will not automatically >fetch the files from the submodule. You need to run (only once) the 'git >submodule init' command. Then every time you want to update the >"common/shared code" you run 'git submodule update'. > >The Pro Git chapter explains it very well, and it is actually quite >simple to setup and use. Thanks a lot, found the chapter and will be going over it this week-end with my son-in-law who uses GIT himself. He did not know of the possibilities before, though. He recently converted his SVN repo to GIT. But I think he has not used this feature. He also earlier told me to look at GIT as replacement for CVS. -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] GIT versioning server on Raspberry Pi?
Continuing with GIT... I am now studying a few on-line documents outlining the conversion of a CVS repository to GIT. There is a script suite named cvs2svn with a number of specific scripts for various targets like cvs2git, so I think I can use this. But I think I have found a problem, which may or may not exist, but I need to check: We use the CVS modules concept a lot in our CVS repository. It virtualizes programming projects by collecting files from various "common" modules into a target structure for the project itself. We have as example a CommonFiles module, which contains 26 files implementing various commonly needed functions. In any given actual project the specific source files for that project is stored as a named module of files. Now the module definition in CVS collects the files and folders from various places into the structure of the project itself, often placing the files for the actual project into a "source" folder. The common files are placed in separate folders next to the source folder in the checkout. The net effect is that we have these specific and common files collected into folders in the work project folder ready to be worked on. The beauty of this is that we do not need to duplicate common functionality between projects as would be the case if we *copied* the common files into the source folder. These files are used in many places but versioned in a single place on the server. What would be the corresponding GIT method for this? Or is it even possible? -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] GIT versioning server on Raspberry Pi?
On Wed, 31 May 2017 23:04:02 +0200, Bo Berglund <bo.bergl...@gmail.com> wrote: >Now remains to find out how to disable the old version shipped with >Raspbian and use the self-compiled newer version. >The $PATH location seems not to help. > Problem solved but not understanding why... I logged off the PuTTY session and then back in again and now the command returns the correct value: $ git --version git version 2.13.0.311.g0339965 Even though it now works it would be intersting to know *why* I had to log off and back on for it to use the path ... -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] GIT versioning server on Raspberry Pi?
On Wed, 31 May 2017 15:42:48 -0400, wkitt...@windstream.net wrote: >On 05/31/2017 02:13 PM, Bo Berglund wrote: >> the response to git --version is still >> 2.1.4 >> >> From where does this come??? > > >at the command line, type in "which git" without the double quotes... $ which git /home/pi/bin/git This is the version I have built myself from sources and it is 2.13 I installed it into the user space rather than into /usr/bin/ However if I do: $ git --version git version 2.1.4 But if I do: $ /home/pi/bin/git --version git version 2.13.0.311.g0339965 Do you now understand my confusion? Executing git on the command line seems to execute the /usr/bin/git instead of the first git on PATH! /home/pi/bin is first on $PATH Seems like git is started in /usr/bin and there it is getting the erroneous version information Why? -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] GIT versioning server on Raspberry Pi?
On Wed, 31 May 2017 10:58:29 +0200, Bo Berglund <bo.bergl...@gmail.com> wrote: >>I always install git >>from source code and compile it myself (like I do with FPC and Lazarus >>too). Everything is then included - as it should be. Linux distros f*ck >>everything up and split it into multiple packages. eg: git-core, >>git-base, git-gui, git-subversion, git-docs etc. > >I also build my FPC/Lazarus installations from svn sources since a >couple of years. But only on Linux, I have not tried it on Windows >yet. > >So I really should go back to the RPi and remove the git I installed >yesterday and instead try to get the sources (via Subversion?) and >build myself then? Is it possible to get the GIT sources without GIT? Stupid question by me... I should use git to get git sources *before* I uninstall the apt-get version of git. The solution is in page: https://git-scm.com/downloads as this command: git clone https://github.com/git/git I used it and it finished successfully in a rather short time. What I received is the latest *development* version, but if I got the idea behind GIT I should now have a git repo locally on my RPi3 and should be able to retrieve the latest released version of git from that, right? If so how do I move forward and find the release, update to it and then build and install git from the sources? The apt-get version of the git I use now is: ~/ $git --version git version 2.1.4 Seems a bit oldish so I updated the RPi3 according to the ProGIT book section 1.5: sudo apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev Then tried to make as per the INSTALL file. Ran for some time and succeeded. So I then also got requirements for the other stuff: sudo apt-get install asciidoc xmlto docbook2x getopt But it failed with this error: E: Unable to locate package getopt so I removed getopt from the install and all other modules installed fine. Then I did: make configure ./configure make all doc info make install install-doc install-html install-info The last line failed as follows: $ make install install-doc install-html install-info SUBDIR git-gui SUBDIR gitk-git SUBDIR perl SUBDIR templates install -d -m 755 '/usr/local/bin' install: cannot change permissions of /usr/local/bin: Operation not permitted Makefile:2408: recipe for target 'install' failed make: *** [install] Error 1 Is it not påossible to put docs and info below the ~/ dir? According to the INSTALL file on the subject of Git install it says: Git installation Normally you can just do "make" followed by "make install", and that will install the git programs in your own ~/bin/ directory. This is exactly what I would like to do instead of putting it below /usr What do I do next? -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] GIT versioning server on Raspberry Pi?
FPC ignore line ending differences? And lastly regarding CVS conversion: Since we have not used CVS in any complex way (but we do use the CVSNT flavour on Windows), I assume that the repository files would be possible to convert into the GIT format. After all each file contains a history with commit messages, timestamps, tags and branches, which are all OK. But the organization may well consitute a problem since we have several cases where multiple products (projects in GIT maybe) are sharing common code via CVS modules. So the same files are used in several places. They are stored outside project modules (folder hierarchies) and brought in at checkout time into subdirectories of the project source tree. Will that complicate GIT conversion? -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] GIT versioning server on Raspberry Pi?
On Tue, 30 May 2017 15:37:30 +0100, Graeme Geldenhuys <mailingli...@geldenhuys.co.uk> wrote: >On 2017-05-30 06:53, Bo Berglund wrote: >> OK, I did not have in mind to use an RPi3 as the final system. I just >> wanted to acquaint myself with GIT using a small portable unit over >> the summer. > >In that case, you don't even need a RPi... Simply practice by doing the >following on your local system: Since my local system is a Windows 7 laptop I have to resort to an RPi to get the Linux system for which the commands are native... > mkdir /data/myremote.git > cd /data/myremote.git > git init --share --bare . So this should not be created inside some user home then? In some documents I found a new user "gituser" is created and in his home is where they placed the master repository. >You just created your remote [bare] git repository. The term "bare" >means that there is no checked out files. If you view that directory it >simply shows all the normally hidden files that git uses to manage a >repository. > >Now for your working repository where you will do you day-to-day commits: > > cd /data/devel/ > git clone /data/myremote.git/ mywork > >You will now have a Git repository in /data/devel/mywork/ which is a >clone of the /data/myremote.git repository. It as automatically set up >the "origin" as your Remote Git Repo. So if you to a git-push, the data >will go to "origin" > >Now playing around in this "mywork" repository. Create commits and >branches. Then do a git-push and magically you will have updated the >"origin" remote git repo too (which in this case is /data/myremote.git/) > >What you learn here, is exactly how you would do things with a real >remote repository. > >I highly recommend everybody interested in using Git reads the free and >open source "Pro Git" book [https://git-scm.com/book/en/v2]. It is >available online or offline in various formats (PDF, ePub etc). Is is >well written, fast to read and with tons of real-world Git examples. I have read a few chapters on-line, including installing git using the command: sudo apt-get install git-all which (of course) differs from the commands I have found in various other how-to pages concerning git... I would very much like to have a PDF copy since I usually find that easier to read than using on-line webpage versions of books. Could not find the PDF though... -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] GIT versioning server on Raspberry Pi?
On Mon, 29 May 2017 12:01:32 +, Mark Morgan Lloyd <markmll.fpc-ot...@telemetry.co.uk> wrote: >On 29/05/17 11:12, Bo Berglund wrote: > >> TestingSo I thought that one way to go forward was for me to use an >> RPi3 boxas a repository server with GIT or whatever (seems like the >> CVSsuccessor SVN is now also on the decline...).Is there a good way to set >> up an RPi3 box as a GIT server and getgoing with that? >> Can GIT work in a way that would be comparable to CVS regardingconcurrent >> development etc? >> Any suggestions on where to start? > >Frankly, and after having run an RPi3 as my desktop system for roughly >nine months, I'd not use an RPi for that. I'd use something like an HP >Microserver with at least mirrored discs, and I'd make sure that I was >able to write a consistent snapshot onto something like a USB stick >storage device. > >My recollection is that while you can set up (software-controlled) >mirrored devices on an RPi, you run into problems mounting them at boot >time due to deficiencies in the loader- that was certainly the case when >I looked at it in the latter part of last year, although low-level >firmware improvements (roughly last November) might have fixed some of that. > >In addition, it's becoming increasingly obvious to many people that the >power arrangement is manky, and that you risk permanent damage to an >SDCard if inserting a USB device briefly pushes the voltage out of spec- >see discussion of the vcgencmd command. > >Finally, you /will/ need to backup, and if you've accumulated any amount >of data you really don't want to try doing that through a single >(internal) USB hub with no possibility of expansion. OK, I did not have in mind to use an RPi3 as the final system. I just wanted to acquaint myself with GIT using a small portable unit over the summer. If it did work and I found it useful I would put a Linux server on our VMWare box and use that as the new versioning server. But over the summer I am moving to a place where space is limited and I thought a small box like a Pi3 could work as a test bed. -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
[fpc-other] GIT versioning server on Raspberry Pi?
I have followed parts of the very long thread "GIT & SVN" and found it informative and partly amusing too... Since I am still on CVS it really was getting me to think about new version control systems and especially GIT since Graeme is pushing so hard for it. Background: --- I have a small company where the engineering team is myself (not so much anymore) and two engineers doing software and electronics. We are making embedded systems and PC (Windows) based processing software. Back in 2002 in order to safeguard against various catastrophies I put in place a CVS *server* on our network for managing the versions of our code and also our CAD drawings and documentation etc. So a lot of the files in CVS are binary. The instructions and firmware image files for our production people are also on our CVS. The CVS backend is an old CVSNT release on a Windows Server 2003 and we use the same cvsnt as client but via the WinCVS GUI front-end. Problems to solve: -- - We need to get a system that is supported today and preferably on a platform that will not be obsoleted like the Windows versions are. - Since we are also now doing development in Linux (for Raspberry Pi using FPC) we need something running on Linux (for the clients). - Generally I don't want us to be ancient tool-wise, but at the same time we have such a huge amount of information invested into the CVS repository. So I need the end soultion to hve some functionality like the CVS system we use today. And a possibility to import the CVS stuff. Testing So I thought that one way to go forward was for me to use an RPi3 box as a repository server with GIT or whatever (seems like the CVS successor SVN is now also on the decline...). Is there a good way to set up an RPi3 box as a GIT server and get going with that? Can GIT work in a way that would be comparable to CVS regarding concurrent development etc? Any suggestions on where to start? -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] How do you keep up with FPC discussions?
On Thu, 25 May 2017 05:20:11 -0400, wkitt...@windstream.net wrote: >each >of the FPC related mailing lists comes into my thunderbird and is filtered to >its own (sub)folder where the messages are read in threaded mode... it is >faster >and available to me even when i'm offline... plus i have a local copy of all >the >messages so i can search historically if desired... Which is exactly how a newsreader works too, you download the messages into the NR and then they are available offline forever and searchable too. My FPC message store reaches back to Sept 2003 and similarly for Borland/Embarcadero Delphi lists (might go even further back on these). I have ALL messages from these places collected for future reference. But my observation is that email is not the best way of managing these things even if you *can* create some folder structure. Email clients evolve a lot and suddenly your old store of messages is not readable anymore. And if you like to switch mail client you are in big trouble. Try to import Outlook PST files with millions of messages into Thunderbird and you will see what I mean... Both Forte Free Agent and Xananews store the data in a sensible format... -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] How do you keep up with FPC discussions?
On Tue, 23 May 2017 21:07:05 -0500, nore...@z505.com wrote: >Maybe I'm a retard and my brain is slow, but how the f**k do you keep up >with all these emails and have any time for programming, cooking, >working, hiking, possibly a relationship with opposite sex? > Well, for one thing, skip the emails and use the GMane News server interface to the mail list instead! This particular list is in gmane.comp.compilers.free-pascal.social for example. Then you will get a threaded view and can easily navigate quickly between the various posts. You see immediately to which sub-branch of a discussion a response was made etc etc. And you do not clutter your inbox so you miss important real emails to you. -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] Anyone using Orange PI
On Wed, 1 Mar 2017 08:48:16 +, Mark Morgan Lloyd <markmll.fpc-ot...@telemetry.co.uk> wrote: >> the following functions fail (within fpc/lazarus calls) >> >> Params all return blank - so cant use Param(0) etc >> ApplicatioName returns blank >> ProgramDirectory returns blank >> >> There may be others, but haven't hit them yet. > >That sounds like the OS has mangled the shell in some way. And from the Orange's webpage each model has its own set of possible OS:es so there is a chance that it will actually work somewhere, but who knows where? With the RPi we know it works and there is ample developer support to plug a problem fairly quickly. -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] Anyone using Orange PI
On Tue, 28 Feb 2017 22:08:31 -0300, Andreas Berger <andr...@thebergerclan.org> wrote: >Bo, when the time comes for me to start working on any Pi, can I get in >contact with you to help get FPC started? Shure, you're welcome! -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] Anyone using Orange PI
On Tue, 28 Feb 2017 08:28:05 +0100, Bo Berglund <bo.bergl...@gmail.com> wrote: >Why not go with the original Raspberry Pi instead? I found a test video on Youtube: https://www.youtube.com/watch?v=Nzy914jLU_w Seems like going original RPi is better. -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] [fpc-pascal] Missing messages
On Wed, 2 Nov 2016 09:48:30 +0100, Allan <allan2...@warpspeed.dyndns.dk> wrote: >On Mon, 31 Oct 2016 09:38:43 + >Graeme Geldenhuys <mailingli...@geldenhuys.co.uk> wrote: > > > On 2016-10-31 08:34, Bo Berglund wrote: > > > By what I have seen is that Lars cannot continue the web interface > > > to Gmane NNTP, but that the NNTP server will continue. > > > > Ah, thanks for clarifying that. I was under the impression that Gmane > > was going to close down completely. Nice to hear that part of it (the > > most important part) is still going to continue. > >I really don't care, if his web interface goes away - never used it. >If he really would stop the gmane newsserver, I would just link >the mailinglist to my own newsserver, as I have done with lots of other >mailinglists, over the years :-) > >I think the discussion about which model is the right one for FPC is >stupid, as no one will ever agree on anything. > >OTOH, I have been running my own newsserver for 15 years - with a >gateway to a mailinglist server, and a very simple Webinterface on top >of the newsserver - and it has been running that way all the time on >OS/2 ! Please don't tell me - that there is not very simple solutions >for that ( and hopefully 15 years newer :-) ) for nix or win. ... > Allan. Sounds like one could set up such a server on a Raspberry Pi (Linux Debian type). I am running all kinds of stuff on RPi, for example Lazarus/FPC, a VPN server and more. Do you have any advice on how to install an NNTP server on Linux? I have never looked at that before. It would need to subscribe to lists using its own dedicated mail account, right? -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] [fpc-pascal] Missing messages
On Mon, 31 Oct 2016 02:12:44 +0100, Allan <allan2...@warpspeed.dyndns.dk> wrote: >Anyway, I agree, that newsservers are the best for this, so it >is nice, that all FPC maillists are on Gmane now. >Unfortunately, that have been some talks about stopping the Gmane >service, so it would be nice to see fpc lists on a more permanent >newsserver. By what I have seen is that Lars cannot continue the web interface to Gmane NNTP, but that the NNTP server will continue. It was a while since I read it so things may have changed. (I use GMANE NNTP myself of course.) -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] [fpc-pascal] Missing messages
On Sun, 30 Oct 2016 22:36:59 +, Graeme Geldenhuys <mailingli...@geldenhuys.co.uk> wrote: >NNTP has many other benefits too: Graeme, I really agree with all of the items in your list! Good summary! :) -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] Submitting fpc-devel mailing list to Gmane service.
On Wed, 2 Mar 2016 11:28:02 +0200, Cyrax <ev...@hotmail.com> wrote: >>> It is created and group name is gmane.comp.compilers.free-pascal.devel >>> >> Found it! :) >> But is there any way that the existing mail archives can be imported? > ><url:http://gmane.org/import.php> >You need to ask Gmane maintaner to import the archives. And to do this Gmane says you must be the admin of the mail list to be imported... Obviously I am not. -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] Submitting fpc-devel mailing list to Gmane service.
On Wed, 2 Mar 2016 08:21:01 +0200, Cyrax <ev...@hotmail.com> wrote: > >It is created and group name is gmane.comp.compilers.free-pascal.devel > Found it! :) But is there any way that the existing mail archives can be imported? -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] Networking problem from Linux virtual machine hosting Lazarus
I found cause of the problem! - It turns out that another connectivity configuration screwed up the connection from my virtual machine! Here goes: Some time ago I wanted to share my Win7 VPN connection to the Raspberry Pi target for my Lazarus development when I worked on the Pi. The reason is the same as for the Linux virtual machine: to reach the company software version control server on the internal company network. The only way I could figure this out was to set up my Win7 as a WiFi hotspot and configure the VPN channel as shared to the WiFi access point network. The sharing was configured on the VPN connectoid targeting the AP network. Then whenever the Pi connected to the WiFi AP served by my Win7 laptop it would get access to the VPN network. Since the Pi also had an Ethernet wired connection I had to set up the route for 10.0.0.0 on the Pi to target the wlan0 network rather than the eth0 network. For this I created a shellscript that runs by cron every minute and checks the connection status and route table. With this I could connect to the VPN network (10.0.0.x) from the Pi via WiFi and everything else via eth0. On the Win7 laptop I have a batch script that enables the WiFi access point when needed. So I believed that this would make the connection depend on my WiFi AP state. But it seems like the very fact that "Internet Sharing" is enabled on the VPN connectoid towards the Access Point network excludes it from everything else including the VMWare NAT network... As soon as I removed the Internet sharing setting on the VPN connection I could start pinging VPN from the Linux Mint virtual machine when VPN is connected. So now I have created a second copy of the VPN connectoid (different name) where the sharing towards the Access point is enabled. When I need the RPi to have access I connect to VPN using this connectoid and start the access point. Otherwise I have the AP shut down and the original VPN connection (without sharing) active, and now the virtual machine gets a route into VPN. Rather convolved but actually working. PS: I tried to share the VPN connection to the Ethernet network on my Win7 laptop. The plan was for the other computers on my network (RPi units as well as my wife's laptop) to get access via a route to my laptop for that network. However, that fell flat on its face because when I did that my Ethernet networking on the PC stopped working. Could not reach local resources on my internal network anymore.... DS -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
[fpc-other] Networking problem from Linux virtual machine hosting Lazarus
I hope this might be acceptable to ask here even if it is FPC and Lazarus off topic I have created a VMWare WS12PRO virtual machine in which I have installed Linux Mint 17.3 MATE to host FreePascal 3.0.0 and Lazarus 1.6. These are now fine and working. As a last item I need to secure connectivity to the company version control system hosted on a Windows server on address 10.0.0.7 This network is on-line on the VMWare host PC (Windows7 X64) via VPN. I have set the virtual machine networking to NAT so it will use the host networking system and it should be able therefore to use the VPN channel to reach the 10.0.0.7 server. This is the addresses of my system: Main PC (VMWare host): IP=192.168.0.137 Mask=255.255.255.0 GW=192.168.0.129 VMWare virtual adapter for vnet8 on main PC: IP=192.168.80.1 Mask=255.255.255.0 Linux Mint virtual machine: IP=192.168.80.130 Mask=255.255.255.0 GW=192.168.80.2 Server on VPN network: IP=10.0.0.7 Mask=255.255.255.0 I know that this should work but I feel that there is something missing on the Linux side to make it actually start working... On previous Linux virtual machines (VMWare Workstation 7 level) I did not have to do anything else than connect VPN on my host PC to make that network also available on the virtual computer. Does not work now... I have tried adding route 10.0.0.0 on the linux side as follows: bosse@mint17mate ~ $ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.80.2 0.0.0.0 UG0 0 0 eth0 10.0.0.0 192.168.80.1 255.255.255.0 UG0 0 0 eth0 192.168.80.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 But this does not work either. I don't get any ping response. On the host system I get immediate response... Is there anyone here who has done this and made it work? -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] Submitting fpc-devel mailing list to Gmane service.
On Sat, 27 Feb 2016 13:21:20 +, Mark Morgan Lloyd <markmll.fpc-ot...@telemetry.co.uk> wrote: >Cyrax wrote: >> I propose adding fpc-devel list to Gmane service. fpc-pascal list is >> there already and for completeness, fpc-devel would be nice addition. >> >> Thoughts on this matter? >> >> <url:http://gmane.org/> > >Yes please. +1 (not that I would have much to contribute on devel, but it is nice being able to follow discussions) And NNTP beats forums outright! -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] [fpc-pascal] Access GPIO pins on RPi2 without root?
Thanks, I have come a lot further now, in fact I am done with the basic reasearch on how to do the I/O. What I found is that the pigpio.pas file found in the lazarus wiki needs some slight modifications and then it is perfectly OK to use. No need for any bigger driver than this to do the RPi2 I/O. I have added a define for RPi2 and used it thus: [code] interface // The following option controls whether the code is optimized for Raspberry PI 2. // Added 2015-10-10 by Bo Berglund following web advice to get it working on the Pi2 hardware {$DEFINE RPi2} ... const REG_GPIO = {$IFDEF RPi2} $3F000 {$ELSE} $2 {$ENDIF};//bcm2835/bcm2836 gpio register ... // Mapping the RPi GPIO pin functions to GPIO I/O, should be here rather than in user code RPI_P3 = 2; //GPIO2 RPI_P5 = 3; //GPIO3 RPI_P7 = 4; //GPIO4 RPI_P8 = 14; //GPIO14 RPI_P10 = 15; //GPIO15 RPI_P11 = 17; //GPIO17 RPI_P12 = 18; //GPIO18 RPI_P13 = 27; //GPIO27 RPI_P15 = 22; //GPIO22 RPI_P16 = 23; //GPIO23 RPI_P18 = 24; //GPIO24 RPI_P19 = 10; //GPIO10 RPI_P21 = 9; //GPIO9 RPI_P22 = 25; //GPIO25 RPI_P23 = 11; //GPIO11 RPI_P24 = 8; //GPIO8 RPI_P26 = 7; //GPIO7 ... function TIoDriver.MapIo: boolean; begin Result := True; {$IFDEF RPi2} fd := fpopen('/dev/gpiomem', O_RdWr or O_Sync); // Open the master /dev/memory device {$ELSE} fd := fpopen('/dev/mem', O_RdWr or O_Sync); // Open the master /dev/memory device {$ENDIF} if fd < 0 then begin Result := False; // unsuccessful memory mapping end; // end; [/code] With this in place the standard user pi will have access to the needed /dev/gpiomem device and no root is required. I have successfully used several ports to drive a relay board now. Best Regards, Bo Berglund -Original Message- From: fpc-other-boun...@lists.freepascal.org [mailto:fpc-other-boun...@lists.freepascal.org] On Behalf Of Travis Siegel Sent: den 11 oktober 2015 18:02 To: Other FPC related discussions. Subject: Re: [fpc-other] [fpc-pascal] Access GPIO pins on RPi2 without root? You can add any user to any group you like, by using the groupadd program in the terminal. For example, usermod -a -G audio pi would add the pi user to the audio group, allowing them to use audio functions without having to be root or use sudo for the access. Of course, the usermod command needs to be run as root, either with sudo, or as being logged in as root If you can figure out what group the io pins are in, this could solve your problem. ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] [fpc-pascal] Access GPIO pins on RPi2 without root?
>If it would be a FPC specific usage question then it would be a bad idea to post it to fpc-other. >However as others have already stated accessing GPIOs on RPi is non specific to FPC and thus it doesn't need to be on fpc-pascal or even fpc-devel. OK, I understand. I have researched a bit more now given the input I received. Apparently on a Raspberry Pi there are several defined user groups with specific permissions on the /dev/xxx device files. It seems like the user pi is member of a lot of these groups and thus would not really need root to run a program accessing the hardware. However, when I look at the unit pigpio.pas I found in the lazarus wiki following a link in one of the responses I got I see this: function TIoDriver.MapIo: boolean; begin Result := True; fd := fpopen('/dev/mem', O_RdWr or O_Sync); // Open the master /dev/memory device if fd < 0 then begin Result := False; // unsuccessful memory mapping end; // end; Notice that the file used is /dev/mem I don't know if there exists a user group named mem, but in any case the user pi is not member of any such group. Could this be the cause for root to be required? pi@rpi2-jessie ~ $ groups pi pi : pi adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c gpio I asked a similar question in the Raspberry Pi forum and got a reply telling me to modify this to become: fd := fpopen('/dev/gpiomem', O_RdWr or O_Sync); While writing this the final compile of lazarus just finished (I have started from scratch using Raspbian Jessie and installed trunk of both fpc and lazarus from svn). So now I will soon be able to check this Best Regards, Bo Berglund ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other