OpenWrt Forum Archive

Topic: Help Migrating Google Authenticator to New Package Feed

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Short summary of the post:

I am trying to move the libpam-google-authenticator package from the old packages feed to the new packages feed since it apparently got overlooked when the packages were migrated.  Trying to figure out how to do this though has raised a few questions I was hoping someone could answer.  Most important, is there any technical reason why I could not reuse the makefile from the old packages feed for libpam-google-authenticator (available here) with the new packages feed?  My gut instinct is to just recycle the makefile, update any broken paths, get it to build, and then submit it as a patch if it does.

TL;DR Version:

So I just upgraded from Barrier Breaker to Chaos Calmer, and I want to integrate Google Authenticator into my SSH login process.  This was easy to do in Barrier Breaker by installing the openssh-pam, libqrencode, and libpam-google-authenticator packages.  Unfortunately, openssh-pam and libqrencode were migrated to the new packages feed, but libpam-google-authenticator was not.  So there is no prebuilt package for libpam-google-authenticator for Chaos Calmer.

One solution appears to be to manually install the libpam-google-authenticator package built for Barrier Breaker manually.  See here.  However, this seems to be a bit of a hack to me, and I prefer clean solutions.  The clean solution is to just move libpam-google-authenticator to the new packages feed to make sure it gets included in future builds/releases.  Since the old package from Barrier Breaker still works with Chaos Calmer, my first thought was that I could just put together a makefile. 

Boy am I in over my head on that one.  Looking at the makefiles for packages in the new package feed as an example of what is required, I noticed that the syntax is unlike anything I have ever seen for makefiles.  To quote OpenWRT's own documentation on creating package makefiles from here:

Looking at one of the package makefiles, you'd hardly recognize it as a makefile. Through what can only be described as blatant disregard and abuse of the traditional make format, the makefile has been transformed into an object oriented template which simplifies the entire ordeal.

Since I can barely make heads or tails of OpenWRT's makefiles for packages, I wanted to know if there has been any change between the versions of makefiles used for the old package feed versus the makefiles used for the new packages feed?  The documentation is silent on that question.  As best I can tell, the difference between the old packages feed and the new one is that the hosting location for the packages was changed.  But I could be wrong and wanted to confirm.

Thanks in advance for any help.

I think you can hack feeds.conf, put the old package feed source url in it, then feed install it. and put old package source code to the correspond folder of newer milestone folder, i have successful compile a deprecated package which called nwan with cc, but it just can be done in the surface, its alot thing to do with its perfect integrated, you have to have the old deprecated kernel dependency in it too. and make sure there is not a error when you open it through luci gui. Its a big chance to try, good luck to you.

(Last edited by djgend on 10 Feb 2017, 13:24)

The discussion might have continued from here.