{"thread":{"id":"13674","subject":"cvsimport in cron","startedAt":"2008-05-26T18:00:39Z","lastAt":"2008-05-27T15:31:17Z","messageCount":8,"participants":["barrymac","Martin Langhoff","Barra Mac Mathúna","Michael J Gruber","John J. Franey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"77786","messageId":"17476529.post@talk.nabble.com","threadId":"13674","inReplyTo":null,"subject":"cvsimport in cron","fromName":"barrymac","fromEmail":"barrymac@gmail.com","sentAt":"2008-05-26T18:00:39Z","receivedAt":"2008-05-26T18:00:39Z","isPatch":false,"sender":{"key":"barrymac@gmail.com","avatar":"https://gravatar.com/avatar/c377bc081a7e89be2eb82fca5a476df399e4bdbde6dac8910d99bf1061676de9?d=mp&s=160"},"body":"\nHi All,\n\nApologies if this is a standard mistake, I'm not very experienced with cron. \nI'm trying to run cvsimport commands from within a cron job but it always\nreturns:\ncvs: Connection refused\nUse of uninitialized value in scalar chomp at /usr/bin/git-cvsimport line\n349.\nUse of uninitialized value in substitution (s///) at /usr/bin/git-cvsimport\nline 350.\nExpected Valid-requests from server, but got: <unknown>\n\nI use ssh keys and have tested that they work  by using scp within the\nscript. The script goes as follows:\n\nkeychain /var/spool/gitosis/.ssh/id_rsa\n. /var/spool/gitosis/.keychain/`uname -n`-sh\n\ngit-cvsimport -d :ext:barrym@cvs:/cvsroot -vio master CVSMODULE \n\nIt would also be nice if someone could tell me also how to log the output. \n\nThanks in advance,\nBarry.\n\n-- \nView this message in context: http://www.nabble.com/cvsimport-in-cron-tp17476529p17476529.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"77814","messageId":"46a038f90805261613v4ad72ddcxe6ee78fa0b54f89e@mail.gmail.com","threadId":"13674","inReplyTo":"17476529.post@talk.nabble.com","subject":"Re: cvsimport in cron","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2008-05-26T23:13:34Z","receivedAt":"2008-05-26T23:13:34Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Tue, May 27, 2008 at 6:00 AM, barrymac <barrymac@gmail.com> wrote:\n> Apologies if this is a standard mistake, I'm not very experienced with cron.\n> I'm trying to run cvsimport commands from within a cron job but it always\n> returns:\n\nI've done this plenty, so it's known to work. Not sure why it's\nfailing in your case.\n\n> I use ssh keys and have tested that they work  by using scp within the\n> script. The script goes as follows:\n\nThat's a good start. Have you tried a cvs-over-ssh cvs operation from cron?\n\n> It would also be nice if someone could tell me also how to log the output.\n\nJust wrap the commandline in\n\n  ( $cmd 2>&1) > /tmp/cvsimport.log\n\nHTH, and tell us what the problem was - so the next one to bump into\nit find the answer in the list ;-)\n\ncheers,\n\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- School Server Architect\n - ask interesting questions\n - don't get distracted with shiny stuff - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"77843","messageId":"ce7555260805270345x353cfc76ja3f7ec83a0ab5c61@mail.gmail.com","threadId":"13674","inReplyTo":"46a038f90805261613v4ad72ddcxe6ee78fa0b54f89e@mail.gmail.com","subject":"Re: cvsimport in cron","fromName":"Barra Mac Mathúna","fromEmail":"barrymac@gmail.com","sentAt":"2008-05-27T10:45:03Z","receivedAt":"2008-05-27T10:45:03Z","isPatch":false,"sender":{"key":"barrymac@gmail.com","avatar":"https://gravatar.com/avatar/c377bc081a7e89be2eb82fca5a476df399e4bdbde6dac8910d99bf1061676de9?d=mp&s=160"},"body":"Thanks Martin,\n\nNice to know how to log the progress! Good tip to try normal cvs over\nssh, which works fine.\n\nI wish it was possible to get more verbose output from the git\ncvsimport command. The connection refused error seems to me to be\nmisleading. I would expect at least some output from cvsps but it\ndoesn't even get to the first step.\n\nSo if everything works at the command line, what significant things\ncan be different in a cron job?\n\nI also downgraded to the stable version according to gentoo, so I'm on\nusing 1.5.3.7 now, same result. Unfortunately I might have to give up\nsoon and ask developers to update their own repositories, as it's\nburning up time.\n\nWill post of course if I find the solution.\n\nThanks,\nBarry.\n\n\nOn Tue, May 27, 2008 at 12:13 AM, Martin Langhoff\n<martin.langhoff@gmail.com> wrote:\n> On Tue, May 27, 2008 at 6:00 AM, barrymac <barrymac@gmail.com> wrote:\n>> Apologies if this is a standard mistake, I'm not very experienced with cron.\n>> I'm trying to run cvsimport commands from within a cron job but it always\n>> returns:\n>\n> I've done this plenty, so it's known to work. Not sure why it's\n> failing in your case.\n>\n>> I use ssh keys and have tested that they work  by using scp within the\n>> script. The script goes as follows:\n>\n> That's a good start. Have you tried a cvs-over-ssh cvs operation from cron?\n>\n>> It would also be nice if someone could tell me also how to log the output.\n>\n> Just wrap the commandline in\n>\n>  ( $cmd 2>&1) > /tmp/cvsimport.log\n>\n> HTH, and tell us what the problem was - so the next one to bump into\n> it find the answer in the list ;-)\n>\n> cheers,\n>\n>\n>\n> m\n> --\n>  martin.langhoff@gmail.com\n>  martin@laptop.org -- School Server Architect\n>  - ask interesting questions\n>  - don't get distracted with shiny stuff - working code first\n>  - http://wiki.laptop.org/go/User:Martinlanghoff\n>\n\n\n\n-- \nI must Create a System, or be enslaved by another Man's\nWm. Blake 1757 - 1827\n"},{"id":"77847","messageId":"g1gq3u$jb$1@ger.gmane.org","threadId":"13674","inReplyTo":"ce7555260805270345x353cfc76ja3f7ec83a0ab5c61@mail.gmail.com","subject":"Re: cvsimport in cron","fromName":"Michael J Gruber","fromEmail":"michaeljgruber+gmane@fastmail.fm","sentAt":"2008-05-27T11:08:45Z","receivedAt":"2008-05-27T11:08:45Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Barra Mac Mathúna venit, vidit, dixit 27.05.2008 12:45:\n> Thanks Martin,\n> \n> Nice to know how to log the progress! Good tip to try normal cvs over\n> ssh, which works fine.\n> \n> I wish it was possible to get more verbose output from the git\n> cvsimport command. The connection refused error seems to me to be\n> misleading. I would expect at least some output from cvsps but it\n> doesn't even get to the first step.\n> \n> So if everything works at the command line, what significant things\n> can be different in a cron job?\n\nThe environment! Put \"env\" in your cron job and compare the output to \n\"env\" on the command line. cvs or cvsps may be in $PATH on the command \nline but not in cron, or $PERL5LIB might be different.\n\nCheers,\nMichael\n"},{"id":"77848","messageId":"46a038f90805270431u3812d73u9505179c641c7075@mail.gmail.com","threadId":"13674","inReplyTo":"g1gq3u$jb$1@ger.gmane.org","subject":"Re: cvsimport in cron","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2008-05-27T11:31:23Z","receivedAt":"2008-05-27T11:31:23Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Tue, May 27, 2008 at 11:08 PM, Michael J Gruber\n<michaeljgruber+gmane@fastmail.fm> wrote:\n> The environment! Put \"env\" in your cron job and compare the output to \"env\"\n> on the command line. cvs or cvsps may be in $PATH on the command line but\n> not in cron, or $PERL5LIB might be different.\n\nand perhaps $CVSROOT...\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- School Server Architect\n - ask interesting questions\n - don't get distracted with shiny stuff - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"77849","messageId":"ce7555260805270508g6ea72ee5hd0cc49b716698cbe@mail.gmail.com","threadId":"13674","inReplyTo":"ce7555260805270345x353cfc76ja3f7ec83a0ab5c61@mail.gmail.com","subject":"Re: cvsimport in cron","fromName":"Barra Mac Mathúna","fromEmail":"barrymac@gmail.com","sentAt":"2008-05-27T12:08:02Z","receivedAt":"2008-05-27T12:08:02Z","isPatch":false,"sender":{"key":"barrymac@gmail.com","avatar":"https://gravatar.com/avatar/c377bc081a7e89be2eb82fca5a476df399e4bdbde6dac8910d99bf1061676de9?d=mp&s=160"},"body":"I've also tried the command like this:\n\ngit-cvsimport p --no-cvs-direct -vio master CVSMODULE\n\nApparently cvsps has it's own client implementation, so I thought I'd\ndisable that in order to be more sure that it was working in the same\nway as the normal cvs over ssh update that works fine in cron.\n\nBarry.\n\n\nOn Tue, May 27, 2008 at 10:45 AM, Barra Mac Mathúna <barrymac@gmail.com> wrote:\n> Thanks Martin,\n>\n> Nice to know how to log the progress! Good tip to try normal cvs over\n> ssh, which works fine.\n>\n> I wish it was possible to get more verbose output from the git\n> cvsimport command. The connection refused error seems to me to be\n> misleading. I would expect at least some output from cvsps but it\n> doesn't even get to the first step.\n>\n> So if everything works at the command line, what significant things\n> can be different in a cron job?\n>\n> I also downgraded to the stable version according to gentoo, so I'm on\n> using 1.5.3.7 now, same result. Unfortunately I might have to give up\n> soon and ask developers to update their own repositories, as it's\n> burning up time.\n>\n> Will post of course if I find the solution.\n>\n> Thanks,\n> Barry.\n>\n>\n> On Tue, May 27, 2008 at 12:13 AM, Martin Langhoff\n> <martin.langhoff@gmail.com> wrote:\n>> On Tue, May 27, 2008 at 6:00 AM, barrymac <barrymac@gmail.com> wrote:\n>>> Apologies if this is a standard mistake, I'm not very experienced with cron.\n>>> I'm trying to run cvsimport commands from within a cron job but it always\n>>> returns:\n>>\n>> I've done this plenty, so it's known to work. Not sure why it's\n>> failing in your case.\n>>\n>>> I use ssh keys and have tested that they work  by using scp within the\n>>> script. The script goes as follows:\n>>\n>> That's a good start. Have you tried a cvs-over-ssh cvs operation from cron?\n>>\n>>> It would also be nice if someone could tell me also how to log the output.\n>>\n>> Just wrap the commandline in\n>>\n>>  ( $cmd 2>&1) > /tmp/cvsimport.log\n>>\n>> HTH, and tell us what the problem was - so the next one to bump into\n>> it find the answer in the list ;-)\n>>\n>> cheers,\n>>\n>>\n>>\n>> m\n>> --\n>>  martin.langhoff@gmail.com\n>>  martin@laptop.org -- School Server Architect\n>>  - ask interesting questions\n>>  - don't get distracted with shiny stuff - working code first\n>>  - http://wiki.laptop.org/go/User:Martinlanghoff\n>>\n>\n>\n>\n> --\n> I must Create a System, or be enslaved by another Man's\n> Wm. Blake 1757 - 1827\n>\n\n\n\n-- \nI must Create a System, or be enslaved by another Man's\nWm. Blake 1757 - 1827\n"},{"id":"77855","messageId":"1211895207.7877.4.camel@isidore.myhome.westell.com","threadId":"13674","inReplyTo":"g1gq3u$jb$1@ger.gmane.org","subject":"Re: cvsimport in cron","fromName":"John J. Franey","fromEmail":"jjfraney@gmail.com","sentAt":"2008-05-27T13:33:27Z","receivedAt":"2008-05-27T13:33:27Z","isPatch":false,"sender":{"key":"jjfraney@gmail.com","avatar":null},"body":"On Tue, 2008-05-27 at 13:08 +0200, Michael J Gruber wrote:\n> Barra Mac Mathúna venit, vidit, dixit 27.05.2008 12:45:\n> > Thanks Martin,\n> > \n> > Nice to know how to log the progress! Good tip to try normal cvs over\n> > ssh, which works fine.\n> > \n> > I wish it was possible to get more verbose output from the git\n> > cvsimport command. The connection refused error seems to me to be\n> > misleading. I would expect at least some output from cvsps but it\n> > doesn't even get to the first step.\n> > \n> > So if everything works at the command line, what significant things\n> > can be different in a cron job?\n> \n> The environment! Put \"env\" in your cron job and compare the output to \n> \"env\" on the command line. cvs or cvsps may be in $PATH on the command \n> line but not in cron, or $PERL5LIB might be different.\n> \n> Cheers,\n> Michael\n> \n\nGreat suggestion!\n\nI am also having this problem.  To debug, I inserted env as you\nsuggested.  (Doh, why didn't this occur to me weeks ago?).  I compared\nthe output of cron and login-shell runs.\n\nSo what is the critical env diff between cron run and login run?\n\nThe answer is:  CVS_RSH=ssh\n\nBe sure to export.\n\nThanks.\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"77867","messageId":"ce7555260805270831j648a0e36laaac7b0a7c349e7@mail.gmail.com","threadId":"13674","inReplyTo":"1211895207.7877.4.camel@isidore.myhome.westell.com","subject":"Re: cvsimport in cron","fromName":"Barra Mac Mathúna","fromEmail":"barrymac@gmail.com","sentAt":"2008-05-27T15:31:17Z","receivedAt":"2008-05-27T15:31:17Z","isPatch":false,"sender":{"key":"barrymac@gmail.com","avatar":"https://gravatar.com/avatar/c377bc081a7e89be2eb82fca5a476df399e4bdbde6dac8910d99bf1061676de9?d=mp&s=160"},"body":"Wow thanks so much!!\n\nIt's great to get such a quality response from the mailing list!\n\nOn to the next problem :-)\n\n\nOn Tue, May 27, 2008 at 1:33 PM, John J. Franey <jjfraney@gmail.com> wrote:\n> On Tue, 2008-05-27 at 13:08 +0200, Michael J Gruber wrote:\n>> Barra Mac Mathúna venit, vidit, dixit 27.05.2008 12:45:\n>> > Thanks Martin,\n>> >\n>> > Nice to know how to log the progress! Good tip to try normal cvs over\n>> > ssh, which works fine.\n>> >\n>> > I wish it was possible to get more verbose output from the git\n>> > cvsimport command. The connection refused error seems to me to be\n>> > misleading. I would expect at least some output from cvsps but it\n>> > doesn't even get to the first step.\n>> >\n>> > So if everything works at the command line, what significant things\n>> > can be different in a cron job?\n>>\n>> The environment! Put \"env\" in your cron job and compare the output to\n>> \"env\" on the command line. cvs or cvsps may be in $PATH on the command\n>> line but not in cron, or $PERL5LIB might be different.\n>>\n>> Cheers,\n>> Michael\n>>\n>\n> Great suggestion!\n>\n> I am also having this problem.  To debug, I inserted env as you\n> suggested.  (Doh, why didn't this occur to me weeks ago?).  I compared\n> the output of cron and login-shell runs.\n>\n> So what is the critical env diff between cron run and login run?\n>\n> The answer is:  CVS_RSH=ssh\n>\n> Be sure to export.\n>\n> Thanks.\n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n>\n\n\n\n-- \nI must Create a System, or be enslaved by another Man's\nWm. Blake 1757 - 1827\n"}]}